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



##########
File path: 
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx
##########
@@ -195,6 +197,10 @@ const FilterValue: React.FC<FilterProps> = ({
       />
     );
   }
+  const filterState = { ...filter.dataMask?.filterState };
+  if (filterState.value === undefined && preselection) {
+    filterState.value = preselection;

Review comment:
       I think in previous PR someone added regression for validation, but 
because your changes affect this place also, can you add here like:
   ```
   const isMissingRequiredValue = checkIsMissingRequiredValue(
       filter,
       filter.dataMask?.filterState,
     );
   ...
   filterState={{
               ...filter.dataMask?.filterState,
               validateMessage: isMissingRequiredValue && t('Value is 
required'),
             }}
   ```
   
   or may be we can create separate PR for it




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to