You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ju...@apache.org on 2021/01/02 00:09:00 UTC
[incubator-superset] branch master updated: Refetch samples only
when filters change (#11999)
This is an automated email from the ASF dual-hosted git repository.
junlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 7cc0de1 Refetch samples only when filters change (#11999)
7cc0de1 is described below
commit 7cc0de1694edc6b6f2cd72806a930116a9d73686
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Sat Jan 2 01:08:19 2021 +0100
Refetch samples only when filters change (#11999)
---
superset-frontend/src/explore/components/DataTablesPane.tsx | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/src/explore/components/DataTablesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane.tsx
index d9b3493..a9403c3 100644
--- a/superset-frontend/src/explore/components/DataTablesPane.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane.tsx
@@ -138,13 +138,20 @@ 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 => ({
...prevState,