[data grid] Use baseTooltip slot for column header sort icon #20460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the column header sort icon to use the
baseTooltipslot, ensuring consistency with other header icons (filter and menu icons) and enabling tooltip customization.Problem
Previously, the sort icon used only the native browser tooltip (via the
titleattribute), while other header icons (filter, menu) used thebaseTooltipslot. This inconsistency prevented users from customizing the sort icon tooltip appearance.Solution
rootProps.slots.baseTooltipin GridColumnHeaderSortIcontitle={undefined}to GridColumnSortButton to suppress the native tooltip and prevent double tooltipsenterDelay={1000}to match the behavior of other header iconsChanges
Related Issues
Fixes #11327
Supersedes #11348 and #11349
Testing
Added a test case that verifies:
baseTooltipcomponenttitleattribute is removed from the button to prevent double tooltips→ All tests pass ✅