diff --git a/superset-frontend/src/explore/components/DataTablesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane.tsx index d9b3493c67567..a9403c37fd970 100644 --- a/superset-frontend/src/explore/components/DataTablesPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane.tsx @@ -138,12 +138,19 @@ export const DataTablesPane = ({ ); useEffect(() => { - setIsRequestPending({ + setIsRequestPending(prevState => ({ + ...prevState, [RESULT_TYPES.results]: true, - [RESULT_TYPES.samples]: true, - }); + })); }, [queryFormData]); + useEffect(() => { + setIsRequestPending(prevState => ({ + ...prevState, + [RESULT_TYPES.samples]: true, + })); + }, [queryFormData.adhoc_filters]); + useEffect(() => { if (panelOpen && isRequestPending[RESULT_TYPES.results]) { setIsRequestPending(prevState => ({