forked from Graylog2/graylog2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating react-select to 1.0.0-rc (Graylog2#4189)
* Update react-select css path * Adapt onChange callback to changes in react-select Before react-select passed the object's value, now it passes the whole object. * Filter options passed to react-select Do not pass options not being accepted by the ReactSelect component, letting the prop check to itself. * Deprecate `onValueChange` prop on Select component The purpose of that prop was to offer some internal API we could rely on, but there were many accidental usages of `onChange`, which was going directly to react-select. In this commit we are deprecating `onValueChange` and start using `onChange` instead. This allows us to keep the old API, fix code that was directly using react-select's callback, and avoid accidental pass of props to the encapsulated component. It is still possible to get a direct callback from react-select by using the `onReactSelectChange` prop. * Also filter `value` prop from react-select * Use function ref in Select component * Fix select sm styling * Fix case when user clears select input * Update react select to 1.0.0-rc.10 * Adapt Select onChange callback on multi selects This allows us to encapsulate all related react-select changes in the Select component. * Migrate Select's onValueChange props to onChange * Add now supported autoFocus and required props * Replace deprecated string ref * SelectableList should not be clearable Selected items go into a different component, so there's no need to clear the select input. * Support creating options from Select component This was previously possible by using the `allowCreate` prop, and it suffered many changes in react-select: - Now we can get that functionality by using react-select's `Creatable` component - In order to display the newly added options, react-select requires that created values have the same format as options. This requires some formatting in our side, as our Select component returns and accepts string values * Pass string value to Select component
- Loading branch information
Showing
21 changed files
with
107 additions
and
40 deletions.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
.select-sm .Select-control { | ||
.select-sm .Select-control, .select-sm .Select-input, .select-sm .Select-input > input { | ||
height: 28px; | ||
} | ||
|
||
.select-sm .Select-placeholder { | ||
line-height: 28px; | ||
.select-sm .Select-placeholder, .select-sm .Select-value { | ||
line-height: 28px !important; | ||
} | ||
|
||
.select-sm .Select-input, .select-sm .Select-input > input { | ||
height: 28px; | ||
.select-sm .Select-input > input { | ||
padding: 0; | ||
} |
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
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
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
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
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
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
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
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