From b5f5025b5fcce5642ccb90786386180b91c12762 Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Sat, 18 Nov 2017 08:18:18 -0500 Subject: [PATCH] Revert "Fixes https://github.com/elastic/kibana/issues/14908 (#15003)" This reverts commit 57d64bf13b8355bae490da8466227efd56edac96. --- .../listing/visualize_listing_table.js | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/core_plugins/kibana/public/visualize/listing/visualize_listing_table.js b/src/core_plugins/kibana/public/visualize/listing/visualize_listing_table.js index 296e5fbce0053..bba3ed4e72959 100644 --- a/src/core_plugins/kibana/public/visualize/listing/visualize_listing_table.js +++ b/src/core_plugins/kibana/public/visualize/listing/visualize_listing_table.js @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import _ from 'lodash'; import { SortableProperties } from 'ui_framework/services'; import { Pager } from 'ui/pager'; @@ -49,19 +48,6 @@ export class VisualizeListingTable extends Component { ); this.items = []; this.pager = new Pager(this.items.length, 20, 1); - - this.debouncedFetch = _.debounce(filter => { - this.props.fetchItems(filter) - .then(items => { - this.setState({ - isFetchingItems: false, - selectedRowIds: [], - filter, - }); - this.items = items; - this.calculateItemsOnPage(); - }); - }, 200); } calculateItemsOnPage = () => { @@ -89,8 +75,18 @@ export class VisualizeListingTable extends Component { }; fetchItems = (filter) => { - this.setState({ isFetchingItems: true, filter }); - this.debouncedFetch(filter); + this.setState({ isFetchingItems: true }); + + this.props.fetchItems(filter) + .then(items => { + this.setState({ + isFetchingItems: false, + selectedRowIds: [], + filter, + }); + this.items = items; + this.calculateItemsOnPage(); + }); }; componentDidMount() {