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

   <!-- Bito Reply -->
   Yes, the `stableSelectAll` mode is specifically designed to address this 
issue. By enabling `stableSelectAll`, the component pins the "Select all" count 
and the selection logic to the full option set, ensuring that bulk actions 
operate on all available values rather than just the currently visible 
search-filtered subset. The PR introduces tests (e.g., `stableSelectAll selects 
the entire option set even while a search is active`) that verify this 
behavior, confirming that the component correctly ignores the search filter 
when determining the target set for bulk operations.
   
   
**superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx**
   ```
   test('stableSelectAll selects the entire option set even while a search is 
active', async () => {
     // ...
       await userEvent.type(select, 'Ap');
       act(() => {
         jest.advanceTimersByTime(Constants.FAST_DEBOUNCE + 50);
       });
       await waitFor(() => expect(getAllSelectOptions().length).toBe(2));
   
       await userEvent.click(
         screen.getByText(selectAllButtonText(STABLE_OPTIONS.length)),
       );
       await waitFor(() => expect(onChange).toHaveBeenCalled());
       
expect(onChange.mock.calls.at(-1)?.[0]).toHaveLength(STABLE_OPTIONS.length);
     // ...
   });
   ```


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