Skip to content

Commit

Permalink
fix filter input debouncing (#103087)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Jun 24, 2021
1 parent 4e38dfe commit 4266957
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React from 'react';
import { i18n } from '@kbn/i18n';
import { isEqual } from 'lodash';
import { QueryStringInput, Query } from '../../../../../src/plugins/data/public';
import { useDebouncedValue } from '../shared_components';

Expand Down Expand Up @@ -36,7 +37,11 @@ export const QueryInput = ({
bubbleSubmitEvent={false}
indexPatterns={[indexPatternTitle]}
query={inputValue}
onChange={handleInputChange}
onChange={(newQuery) => {
if (!isEqual(newQuery, inputValue)) {
handleInputChange(newQuery);
}
}}
onSubmit={() => {
if (inputValue.query) {
onSubmit();
Expand Down

0 comments on commit 4266957

Please sign in to comment.