Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render the table after sorting #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shagi
Copy link
Contributor

@shagi shagi commented Jun 6, 2013

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 :-)

@loicfrering
Copy link
Owner

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?

@shagi
Copy link
Contributor Author

shagi commented Jun 6, 2013

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.

@loicfrering
Copy link
Owner

Ok, let me know how it goes 👍

…n's sort event.

Listening to collection's sort event would require also to update
datagrid's sorting, and maybe the sorter used to sort the collection is not
one of datagrid's column sorter.
@shagi
Copy link
Contributor Author

shagi commented Jun 7, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants