Skip to content
Snippets Groups Projects
Unverified Commit f319ca36 authored by Ryan Laurie's avatar Ryan Laurie Committed by GitHub
Browse files

allow filter changes on blur (#22903)

parent 3f353cee
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@ type Props = {
onChangeFilter: (filter: Filter) => void;
onClose?: () => void;
commitOnBlur?: boolean;
noCommitButton?: boolean;
showFieldPicker?: boolean;
......@@ -60,6 +61,7 @@ export default class FilterPopover extends Component<Props, State> {
style: {},
showFieldPicker: true,
showCustom: true,
commitOnBlur: false,
};
constructor(props: Props) {
......@@ -84,6 +86,10 @@ export default class FilterPopover extends Component<Props, State> {
}
}
componentWillUnmount() {
this.props.commitOnBlur && this.handleCommit();
}
setFilter(filter: Filter, hideShortcuts = true) {
this.setState({
filter,
......
......@@ -79,6 +79,7 @@ export const BulkFilterSelect = ({
showFieldPicker={false}
onChangeFilter={handleChange}
onClose={closePopover}
commitOnBlur
/>
)}
/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment