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

Tree#expand behaves indistinguishably for unrendered-but-existing IDs and nonexistent IDs #1229

Open
kfranqueiro opened this issue Jan 4, 2016 · 0 comments

Comments

@kfranqueiro
Copy link
Contributor

When Tree is used with a lazy-rendering grid (which is the norm, e.g. OnDemandGrid or Pagination), the expand method will currently end up throwing an error if an item ID is passed that is not currently rendered - whether it actually exists in the store or not. This is admittedly a likely rare case (compared to the usual case of expand being called as a result of direct user interaction on a row that is already rendered), but could lead to confusion.

I see 3 possible ways of addressing this:

  • Keep the current behavior (potentially confusing)
  • In the absence of a row element, call the collection's get method (potentially expensive for a server-side store, but again, this is a relatively rare case), then only reject if that returns nothing or throws
  • Always modify the _expanded hash, regardless of whether the item will ever be rendered (potentially wasteful if used excessively)
@edhager edhager self-assigned this Aug 31, 2016
@edhager edhager removed their assignment Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants