vitalets / x-editable

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
http://vitalets.github.io/x-editable
MIT License
6.51k stars 1.73k forks source link

x-editable on dynamically created rows rewrite more values #1115

Open lsukdol opened 5 years ago

lsukdol commented 5 years ago

Hello, I am trying to use x-editable to change more "rows" and "cols" of data locally, which is usually no problem (matrix about 5x6 attributes). But this time I need to create new "rows" dynamically.

After initial table creation, everything seems to be ok, I can change every attribute, new values are visible in html table and the same values are stored in background data object. BUT - if I add a row (in fact copy it from an existing row with the "copy" button) and change any of its attribute (column), both of them, source and newly created attributes are changed to the same newValue in the data object. Visible values in the table seems to be changed properly!

You can simulate this in JSFiddle (http://jsfiddle.net/luksuk/kvumo4tn/28/). Copy-link at the end of line duplicates whole line into new row, after editing of any attribute, Show values button prints out the data.

Thanks for any advice or idea how to solve this...