backbone.datagrid icon indicating copy to clipboard operation
backbone.datagrid copied to clipboard

render the table after sorting

Open shagi opened this issue 11 years ago • 4 comments

The table was not updated after collection sorting.

Maybe datagrid view should render after any of the collection events, but I bind only to 'sort' to go one test each time :-)

shagi avatar Jun 06 '13 12:06 shagi

I'm not sure that the datagrid should listen to the sort event because if you bypass the datagrid to directly call sort on the collection, the rows sort order will be inconsistent with the sort icons displayed in the header.

What do you think?

loicfrering avatar Jun 06 '13 14:06 loicfrering

OK, I'll try fixing also the header :-)

I think updating the table when the collection is externally sorted is insteresting, as allows easier integration with other views manipulating the data in the collection.

shagi avatar Jun 06 '13 14:06 shagi

Ok, let me know how it goes :+1:

loicfrering avatar Jun 06 '13 15:06 loicfrering

I didn't find a solution to the header, so at least I fixed the bug. I only checked with inMemory collection, but I suppose the other way worked already fine, as remote sorting resets the collection.

shagi avatar Jun 07 '13 17:06 shagi