fix: filter goes blank on click of any filter value (#1118)

This commit is contained in:
Shailesh Parmar 2021-11-09 21:53:54 +05:30 committed by GitHub
parent 042561857e
commit d0c523a655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@
*/
import classNames from 'classnames';
import { cloneDeep } from 'lodash';
import { cloneDeep, isUndefined } from 'lodash';
import {
AggregationType,
FilterObject,
@ -456,7 +456,7 @@ const Explore: React.FC<ExploreProps> = ({
useEffect(() => {
if (!isMounting.current && previsouIndex === getCurrentIndex(tab)) {
forceSetAgg.current = Boolean(searchIndex);
forceSetAgg.current = isUndefined(tab);
fetchTableData();
}
}, [currentPage, filters, sortField, sortOrder]);