kgabryje commented on code in PR #38479:
URL: https://github.com/apache/superset/pull/38479#discussion_r2905041526


##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx:
##########
@@ -167,6 +167,30 @@ const FilterBar: FC<FiltersBarProps> = ({
 
   const [dataMaskSelected, setDataMaskSelected] =
     useImmer<DataMaskStateWithId>(dataMaskApplied);
+
+  // Clean up stale validation errors on mount
+  // If a filter has a value, it shouldn't have validateStatus: 'error'
+  useEffect(() => {

Review Comment:
   Just noticed that this is actually dead code. We have another use effect 
below this one that calls `setDataMaskSelected(() => dataMaskApplied);` so this 
is being overwritten.
   I tested the PR without this useEffect and it still works well so we can 
safely remove 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