Skip to content

Commit

Permalink
Rename fetchFields to debouncedFetchFields
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaDerevyankina committed Nov 30, 2020
1 parent a22290b commit 93407f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class VisEditor extends Component {
});
}, VIS_STATE_DEBOUNCE_DELAY);

fetchFields = debounce(
debouncedFetchFields = debounce(
(extractedIndexPatterns) => {
if (this.abortControllerFetchFields) {
this.abortControllerFetchFields.abort();
Expand Down Expand Up @@ -107,7 +107,7 @@ export class VisEditor extends Component {

const extractedIndexPatterns = extractIndexPatterns(nextModel);
if (!isEqual(this.state.extractedIndexPatterns, extractedIndexPatterns)) {
this.fetchFields(extractedIndexPatterns).then((visFields) =>
this.debouncedFetchFields(extractedIndexPatterns).then((visFields) =>
this.setState({
visFields,
extractedIndexPatterns,
Expand Down

0 comments on commit 93407f3

Please sign in to comment.