fix(Table): prevent @select
event call when selecting all rows
#838
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Linked issue
#646 #652
β Type of change
π Description
Reverts some of the changes made in #652.
Currently when checking the table header checkbox while the onSelect listener is used, onSelect is executed for every
row instead of just pushing the values to the selected Ref. This is an issue when onSelect is used as suggested in the Docs:
You can use this to navigate to a page, open a modal or even to select the row manually.
In my use case the modal linked to the last item in the rows array will always open ( or many modals at once if implemented differently) and for navigation this is similar. There is no good way to prevent this as only the row is passed to onSelect. I think the checkbox state should not trigger onSelect. The other way around its fine imo and up to the user.
Edit: May be a breaking change to some existing implementations.
π Checklist