fix(explore): fix clearing select data causes popover dismiss (#14221)

* fix(explore): fix clearing select data causes popover dismiss

* wip: lint

* wip: lint
This commit is contained in:
Yaozong Liu
2021-05-20 22:26:27 +08:00
committed by GitHub
parent a9d888ad40
commit ea37274180
3 changed files with 65 additions and 12 deletions

View File

@@ -105,7 +105,7 @@ export default class SelectControl extends React.PureComponent {
// Beware: This is acting like an on-click instead of an on-change
// (firing every time user chooses vs firing only if a new option is chosen).
onChange(opt) {
onChange(opt, actionMeta) {
let optionValue = this.props.multi ? [] : null;
if (opt) {
if (this.props.multi) {
@@ -126,7 +126,7 @@ export default class SelectControl extends React.PureComponent {
}
}
// will eventually call `exploreReducer`: SET_FIELD_VALUE
this.props.onChange(optionValue);
this.props.onChange(optionValue, [], actionMeta);
}
getSelectRef(instance) {