web: components: Applied changes in SearchInput

This commit is contained in:
Alexey Safronov 2019-08-28 10:10:09 +03:00
parent 12f95379d1
commit 82fd6389b4
2 changed files with 3 additions and 2 deletions

View File

@ -225,6 +225,7 @@ class AdvancedSelector extends React.Component {
placeholder={placeholder}
value={value}
onChange={onSearchChanged}
onClearSearch={onSearchChanged.bind(this, "")}
/>
{groups && groups.length > 0 && (
<ComboBox

View File

@ -76,10 +76,10 @@ storiesOf("Components|AdvancedSelector", module)
{({ value, set }) => (
<AdvancedSelector
placeholder={text("placeholder", "Search users")}
onSearchChanged={e => {
onSearchChanged={value => {
set(options.filter(option => {
return (
option.label.indexOf(e.target.value) > -1
option.label.indexOf(value) > -1
);
}));
}}