You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/12/22 10:09:16 UTC

[GitHub] [incubator-superset] agatapst commented on a change in pull request #12157: fix: Reset All filters button

agatapst commented on a change in pull request #12157:
URL: https://github.com/apache/incubator-superset/pull/12157#discussion_r547186668



##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx
##########
@@ -399,6 +399,16 @@ const FilterBar: React.FC<FiltersBarProps> = ({
     });
   };
 
+  const handleResetAll = () => {
+    setFilterData({});
+    const filterIds = Object.keys(filterData);
+    filterIds.forEach(filterId => {
+      if (filterData[filterId]) {
+        setExtraFormData(filterId, {});

Review comment:
       hmm indeed - I assumed that reset meant resetting everything to 0, but maybe the user really expects a reset to default? Adam raised this issue in all PR with native filters. 
   Thanks for the merging, I'll improve it later if it the assumptions are different.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org