bito-code-review[bot] commented on PR #43629:
URL: https://github.com/apache/superset/pull/43629#issuecomment-5447445570

   <!-- Bito Reply -->
   The flagged issue is correct. The current implementation of `AsyncSelect` 
clears the error only when a new network request is initiated, which causes 
stale errors to persist if the fetch returns early due to cache hits or 
`allValuesLoaded`.
   
   The fix implemented in the PR correctly addresses this by moving 
`setError('')` before the early-return checks in `AsyncSelect.tsx`:
   
   ```tsx
           // A previous fetch may have left an error on screen; clear it so the
           // dropdown renders this fetch's outcome instead of the stale error.
           setError('');
           setIsLoading(true);
   ```
   
   This ensures the error state is reset whenever a new fetch operation is 
requested, regardless of whether it results in a network call or a cache hit. 
No further action is required for this specific issue.
   
   
**superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx**
   ```
   // A previous fetch may have left an error on screen; clear it so the
           // dropdown renders this fetch's outcome instead of the stale error.
           setError('');
           setIsLoading(true);
   ```


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