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

Add compareSelectionBy property to DataTable. #981

Closed
ribizli opened this issue Sep 28, 2016 · 5 comments
Closed

Add compareSelectionBy property to DataTable. #981

ribizli opened this issue Sep 28, 2016 · 5 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@ribizli
Copy link

ribizli commented Sep 28, 2016

Not only that the deep equals solution can result in performance problems, I don't see any reason to use it.

There should be an option (e.g. selectionByRef) to use strict equals instead of deep equals.

@cagataycivici cagataycivici self-assigned this May 31, 2017
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label May 31, 2017
@cagataycivici cagataycivici added this to the 4.0.4 milestone May 31, 2017
@cagataycivici
Copy link
Member

Makes sense for sure, for deep equals there is dataKey to speed it up btw.

@cagataycivici cagataycivici changed the title Can DataTable selection based on strict equals (===) instead of 'deep equals'? Add compareSelectionBy property to DataTable. Jun 12, 2017
@cagataycivici
Copy link
Member

Added compareSelectionBy="equals | deepEquals". Made it a string as I have a plan to introduce a 3rd faster option.

@ribizli
Copy link
Author

ribizli commented Jun 12, 2017

What if there isn't a suitable dataKey? At least that shoud support a function input to use identity...

@cagataycivici
Copy link
Member

If there is no dataKey, then equals (identity) or deepEquals (equality).

@ribizli
Copy link
Author

ribizli commented Jun 12, 2017

I've read your answer too late, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants