webismymind / editablegrid

EditableGrid is an open source Javascript library aimed at turning HTML tables into advanced editable components. It focuses on simplicity: only a few lines of code are required to get your first table up and running.
http://www.editablegrid.net
Other
796 stars 271 forks source link

addRow doesn't insert at the end #6

Closed jasvazquez closed 13 years ago

jasvazquez commented 13 years ago

Using this html (http://pastebin.com/bGFkYC4Y) as a example:

  1. order by name
  2. press the "Probar" link

the new row is added as the first entry in the table ;)

webismymind commented 13 years ago

Well, this is not a bug , it's a feature ;)

When inserting a row, the grid gets automatically re-sorted. Here the name you insert is empty, so it becomes the first row.

However, I just made a commit to add an optional parameter "dontSort" to addRow: you can now use:

editableGrid.addRow('F1', {'email':'jasvazquez.publicidad@gmail.com','age':'35'}, true);

jasvazquez commented 13 years ago

That sounds very logical [ sorry, I didn't guess it :( ] Thanks again for a fast response and for the new parameter ;)