Commit cd12d20a authored by Phyks (Lucas Verney)'s avatar Phyks (Lucas Verney)
Browse files

Match only labels and not values in Select fields

parent b1064c2d
Pipeline #52406 failed with stages
in 1 minute and 10 seconds
......@@ -31,6 +31,7 @@ class CategorySelect extends React.Component {
id={this.props.id}
onChange={this.handleChange}
options={this.props.options}
matchProp="label"
/>
);
}
......
......@@ -58,6 +58,7 @@ const SearchTypeSelect = connect(
onChange={props.handleOperationType}
options={typeOptions}
value={props.defaultValue}
matchProp="label"
/>
);
});
......@@ -97,7 +98,7 @@ const SearchCategorySelect = connect(
}
].concat(categories.map(cat => ({ value: cat.id, label: cat.title })));
return <Select value={props.defaultValue} onChange={props.handleChange} options={options} />;
return <Select value={props.defaultValue} onChange={props.handleChange} options={options} matchProp="label" />;
});
const MinDatePicker = connect(
......
......@@ -27,6 +27,7 @@ class TypeSelect extends React.Component {
clearable={false}
onChange={this.handleChange}
options={this.props.types}
matchProp="label"
/>
);
}
......
......@@ -254,6 +254,7 @@ class InitForm extends React.Component {
clearValueText={$t('client.search.clear')}
value={selectedBankDescr && selectedBankDescr.uuid}
options={options}
matchProp="label"
/>
</div>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment