Files
superset2/superset-frontend
Joe Li b7703ca8b0 fix(AsyncSelect): keep loading state until all in-flight fetches resolve
The stale-response early-return at line 354 drops the data but the shared
`.finally` block previously still cleared `isLoading` to false. When a user
typed 'alpha' (in-flight) then 'beta' (also in-flight), alpha's dropped
response flipped the spinner off while beta was still pending. The
undebounced `handlePagination` scroll handler reads `!isLoading` and could
then fire `fetchPage` against stale `totalCount`.

Gate `setIsLoading(false)` on an in-flight fetch counter so the spinner
only clears when every dispatched request has settled. Add regression
test covering the held-alpha + in-flight-beta race, plus coverage for
page>1 results during an active search.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 14:10:16 -07:00
..