|
|
|
@ -146,11 +146,11 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
runOnChange = () => { |
|
|
|
runOnChange = (sanitize = false) => { |
|
|
|
const { onChange } = this.props; |
|
|
|
const { onChange } = this.props; |
|
|
|
const value = Plain.serialize(this.state.value); |
|
|
|
const value = Plain.serialize(this.state.value); |
|
|
|
if (onChange) { |
|
|
|
if (onChange) { |
|
|
|
onChange(this.cleanText(value)); |
|
|
|
onChange(sanitize ? this.cleanText(value) : value); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -166,7 +166,7 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS |
|
|
|
runOnChangeAndRunQuery = () => { |
|
|
|
runOnChangeAndRunQuery = () => { |
|
|
|
// onRunQuery executes query from Redux in Explore so it needs to be updated sync in case we want to run
|
|
|
|
// onRunQuery executes query from Redux in Explore so it needs to be updated sync in case we want to run
|
|
|
|
// the query.
|
|
|
|
// the query.
|
|
|
|
this.runOnChange(); |
|
|
|
this.runOnChange(true); |
|
|
|
this.runOnRunQuery(); |
|
|
|
this.runOnRunQuery(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -177,6 +177,7 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS |
|
|
|
const { onBlur } = this.props; |
|
|
|
const { onBlur } = this.props; |
|
|
|
|
|
|
|
|
|
|
|
if (onBlur) { |
|
|
|
if (onBlur) { |
|
|
|
|
|
|
|
this.runOnChange(true); |
|
|
|
onBlur(); |
|
|
|
onBlur(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// Run query by default on blur
|
|
|
|
// Run query by default on blur
|
|
|
|
|