open-admin icon indicating copy to clipboard operation
open-admin copied to clipboard

JSON Table cloning not applying scripts to cloned elements

Open RCyrix opened this issue 1 year ago • 4 comments

image

Hi there

If we look at the picture above, you'll see the first "Select Element" is ok, the second does not initialize "Select2" and acts the same for any amount I add, even after refresh

The time input acts in a similar way however added rows do initialize after submission,

So if I add lets say 3 rows on create, the first row, all elements and inputs work as expected, second row does not, nor does the third,

If i save the form and open the form up again, so its in an "edit status" the stored values and their respective wrappers initialize correctly (Not the Select2 element) but again when cloning the row the new items don't work

RCyrix avatar Jan 11 '24 19:01 RCyrix

Note the first select box has an arrow indicating the "Select2" script has initialized, but the second does not

RCyrix avatar Jan 11 '24 19:01 RCyrix

Hi there, ive built a custom component to do what i need for now, so what ive noticed is when cloning the row, it successfully updates and changes the elements identifiers, LA_new_1,LA_new_2 etc However when cloning the row the JQuery scripts and events are not attached to the new rows, im looking at a way of initializing again after cloning per row and will revert,

RCyrix avatar Jan 13 '24 03:01 RCyrix

Hi, I'm also having this problem with the selection component, when I clone the line the autocomplete search no longer appears, but a simple dropdown list. The problem has been solved?

gfsoluzioni avatar Jan 30 '24 19:01 gfsoluzioni

Hi, for now i just built a custom component

RCyrix avatar Jan 31 '24 08:01 RCyrix