feat(BulkSelect): extend onSelect with second parameter source#913
Open
raswonders wants to merge 7 commits intopatternfly:mainfrom
Open
feat(BulkSelect): extend onSelect with second parameter source#913raswonders wants to merge 7 commits intopatternfly:mainfrom
raswonders wants to merge 7 commits intopatternfly:mainfrom
Conversation
karelhala
reviewed
Apr 29, 2026
Assisted-by: Cursor
Co-authored-by: Karel Hala <ch4rlien@gmail.com>
Co-authored-by: Karel Hala <ch4rlien@gmail.com>
Co-authored-by: Karel Hala <ch4rlien@gmail.com>
30472c2 to
c167e9d
Compare
c167e9d to
15dc1e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this does
onSelect now receives an optional second argument: source
onSelect is still (value: BulkSelectValue, source?: BulkSelectSource) => void. The first argument is unchanged: the same BulkSelectValue as today (none, page, all, nonePage, depending on pagination and which action the user chose).
The optional second argument tells which control triggered the callback:
'dropdown' — the user picked an option fron the bulk-select menu (e.g. “Select none”, “Select page”, “Select all”).
'checkbox' — the user toggled the split menu toggle checkbox (the quick select/deselect for the current page vs not paginated “all” behavior, as before).
Why we need this
We're trying to implement slightly different handling when the action comes from the dropdown menu vs the checkbox. The original API doesn't allow this.
Backward compatibility
Existing onSelect handlers that only take value keep working; the extra argument is optional at the type level and is ignored at runtime if not used.