Skip to content

Commit 57c44f2

Browse files
b3nibrodriguez
andauthored
fix: wrap IconButton in a span for consistent rendering in MRT_ToggleGlobalFilterButton (#1470)
Co-authored-by: brodriguez <brodriguez@atisoluciones.com>
1 parent 972be12 commit 57c44f2

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

packages/material-react-table/src/components/buttons/MRT_ToggleGlobalFilterButton.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@ export const MRT_ToggleGlobalFilterButton = <TData extends MRT_RowData>({
3030

3131
return (
3232
<Tooltip title={rest?.title ?? localization.showHideSearch}>
33-
<IconButton
34-
aria-label={rest?.title ?? localization.showHideSearch}
35-
disabled={!!globalFilter && showGlobalFilter}
36-
onClick={handleToggleSearch}
37-
{...rest}
38-
title={undefined}
39-
>
40-
{showGlobalFilter ? <SearchOffIcon /> : <SearchIcon />}
41-
</IconButton>
33+
<span>
34+
<IconButton
35+
aria-label={rest?.title ?? localization.showHideSearch}
36+
disabled={!!globalFilter && showGlobalFilter}
37+
onClick={handleToggleSearch}
38+
{...rest}
39+
title={undefined}
40+
>
41+
{showGlobalFilter ? <SearchOffIcon /> : <SearchIcon />}
42+
</IconButton>
43+
</span>
4244
</Tooltip>
4345
);
4446
};

0 commit comments

Comments
 (0)