We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 086f579 + 8461cbb commit b4b51baCopy full SHA for b4b51ba
ui/post-cfg/components/select/CatSelect.tsx
@@ -32,15 +32,16 @@ export class CatSelect extends Component<Props, State> {
32
useComboBoxAsMenuWidth
33
onChange={(_, opt, __, val) => {
34
if (opt !== undefined) {
35
- if (val === undefined) {
+ if (opt.selected !== true || val === undefined) {
36
const selectedCatIds = this.state.selectedCatIds.filter(x => x !== opt.data)
37
this.setState({ selectedCatIds })
38
+ this.props.onChange(selectedCatIds)
39
} else {
40
this.state.selectedCatIds.push(opt.data as number)
41
this.setState(this.state)
42
+ this.props.onChange(this.state.selectedCatIds)
43
}
44
- this.props.onChange(this.state.selectedCatIds)
45
}}
46
/>
47
)
0 commit comments