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

   <!-- Bito Reply -->
   The issue flagged in the review is correct. The previous implementation 
relied on stale state (`overflowedIds`) to determine which items to render in 
the overflow dropdown, causing customizations to be omitted when they should 
have been visible. The fix correctly updates the `dropdownContent` callback to 
use the `overflowedItems` argument provided by `DropdownContainer`, which 
represents the current, accurate partition of items for the current render. 
This ensures that all overflowed items, including customizations, are correctly 
rendered in the popover.
   
   I have verified the implementation in the provided diff, and it correctly 
addresses the issue by filtering `filtersInScope` and `selectedCrossFilters` 
against the `overflowedItems` passed to the callback.
   
   
**superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx**
   ```
   ? (overflowedItems: DropdownItem[]) => {
                     const overflowedItemIds = new Set(
                       overflowedItems.map(item => item.id),
                     );
                     const freshOverflowedFiltersInScope = 
filtersInScope.filter(
                       ({ id }) => overflowedItemIds.has(id),
                     );
                     const freshOverflowedCrossFilters =
                       selectedCrossFilters.filter(({ emitterId, name }) =>
                         overflowedItemIds.has(`${name}${emitterId}`),
                       );
                     return (
                       <>
                         <FiltersDropdownContent
                           overflowedCrossFilters={freshOverflowedCrossFilters}
                           filtersInScope={freshOverflowedFiltersInScope}
                           filtersOutOfScope={filtersOutOfScope}
                           renderer={renderer}
                           rendererCrossFilter={rendererCrossFilter}
                           showCollapsePanel={showCollapsePanel}
                           forceRenderOutOfScope={hasRequiredFirst}
                         />
                         {showCustomizationCollapsePanel && (
                           <CustomizationsOutOfScopeCollapsible
                             customizationsOutOfScope={customizationsOutOfScope}
                             renderer={customizationRenderer}
                             forceRender={false}
                           />
                         )}
                       </>
                     );
                   }
   ```


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