-
Notifications
You must be signed in to change notification settings - Fork 426
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
Breaking change in function behavior getItemById ( Dataview ) #574
Comments
The latest @Danielku15 Pull Request #572 added optimization for bulk operations and changed the code to use Map & Set, if we look at the description of Map on MDN, it says:
I don't think we'll do any code change to fix this, it makes sense that the Type you pass in your SETTER must be the same Type as how you retrieve it with your GETTER. In your use case, you can just add a The move to Map is for efficiency, I don't see us rolling back on this, you need to adjust your code. |
yes I see, but I use this function generically in an Angular component without knowing in advance the nature of the data source and therefore that of the id. |
well technically speaking Angular uses TypeScript which generally enforces strict equality, it's generally bad practice not follow that. Again I think you'll have to adapt your code to handle that, we wouldn't want to revert the code and lose the huge optimization that the last PR brought (bulk change really has a big difference 200ms vs 1100ms on 100,000 items). |
ok i will adapt my code :-) |
BTW, since you've talked about Angular... you can take a look at my lib Angular-Slickgrid, it's a wrapper on top of this SlickGrid fork which works out of the box for Angular with a lot of extra goodies. Thanks for your issue feedback, I wasn't aware of any impact, so it's a "good to know" fact about this new strict equality. |
In the version 2.4.32
with id = '99' or 99 it works.
In version 2.4.33 with id = '99' getItemById does not work anymore
The text was updated successfully, but these errors were encountered: