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

Selection bug fix #339

Closed
wants to merge 2 commits into from
Closed

Selection bug fix #339

wants to merge 2 commits into from

Conversation

clubajax
Copy link

Refs #293 - fixed erroneous selection reporting when deselecting row

@justindoherty
Copy link
Contributor

Won't this break the behaviour of clicking select all, un-selecting 1 item and then while scrolling down an onDemandGrid having the newly rendered rows being checked?

The problem here is that the selection object only gets populated with rendered entries and not all the potential entries that exist in your store.

In our project we've gotten around this by checking if allSelected is true, if so we loop through the selection object and gather all the entries that are false. Then depending on our store (synchronous(Memory) or asynchronous(JsonRest)) we work with the selections differently.

In the case of the Memory store we do a query on the store using the same query that the grid possesses, gather all the ids not including the ones in the selection object that are false. This gives us a complete representation of all the selected ids.

In the case of the JsonRest store we submit the unselected ids to the server and the server then gets all the ids and removes the unselected ones.

Perhaps if allSelected had 3 states (true, false, 'mixed') we would only have to extra calculations if it were in the mixed state.

@ghost
Copy link

ghost commented Mar 14, 2013

Yes @jdohert, you've got a point. Unfortunately select-all opens a huge can of worms, but it's quite the popular feature. :/

At any rate, this pull request certainly doesn't fully resolve things, and 99% of it is completely unrelated to the actual "fix" (which is one line), so I'm closing it.

@ghost ghost closed this Mar 14, 2013
This pull request was closed.
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.

3 participants