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 2021/06/07 09:06:13 UTC

[GitHub] [superset] simcha90 commented on a change in pull request #14869: feat(native-filters): Support default to first value in select filter

simcha90 commented on a change in pull request #14869:
URL: https://github.com/apache/superset/pull/14869#discussion_r646404327



##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
##########
@@ -178,10 +174,21 @@ const FilterBar: React.FC<FiltersBarProps> = ({
 
   const handleFilterSelectionChange = (
     filter: Pick<Filter, 'id'> & Partial<Filter>,
-    dataMask: Partial<DataMaskState>,
+    dataMask: Partial<DataMask>,
   ) => {
     setIsFilterSetChanged(tab !== TabIds.AllFilters);
     setDataMaskSelected(draft => {
+      // force instant updating on initialization or for parent filters when dataMaskSelected has filter

Review comment:
       it happens not only on initialisation - it also happens when we update filter modal, because first it set as undefined and then get correct first value (meantime it still do double loading but need fix later who will have time)




-- 
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