-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
removedValues
into onChange
clear
action meta
The similar actions `remove-value` and `pop-value` have `removedValue` in their `onChange` meta arguments. It would be reasonable to pass the whole `this.state.selectValue` as `removedValues` assuming that all selected values are removed upon `clear`. This will help some client code to add additional logic in `onChange` handlers like filtering of fixed values to preseve after `clear` without referring to `options` array.
- Loading branch information
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"react-select": patch | ||
--- | ||
|
||
Add `removedValues` that points to the current selection into a meta of onChange callback when clearing value. |
This file contains 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
This file contains 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