Skip to content

Commit 28ac9c6

Browse files
committed
fix
1 parent c6a2a07 commit 28ac9c6

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ function GridColumnsManagement(props: GridColumnsManagementProps) {
244244
endAdornment: (
245245
<rootProps.slots.baseInputAdornment position="end">
246246
<rootProps.slots.baseIconButton
247+
size="small"
247248
aria-label={apiRef.current.getLocaleText('columnsManagementDeleteIconLabel')}
248249
style={
249250
searchValue

packages/x-data-grid/src/material/index.tsx

+16-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import MUIFormControlLabel, { formControlLabelClasses } from '@mui/material/Form
1919
import MUISelect from '@mui/material/Select';
2020
import MUISwitch from '@mui/material/Switch';
2121
import MUIButton from '@mui/material/Button';
22-
import MUIIconButton from '@mui/material/IconButton';
23-
import MUIInputAdornment from '@mui/material/InputAdornment';
22+
import MUIIconButton, { iconButtonClasses } from '@mui/material/IconButton';
23+
import MUIInputAdornment, { inputAdornmentClasses } from '@mui/material/InputAdornment';
2424
import MUITooltip from '@mui/material/Tooltip';
2525
import MUIPopper, { PopperProps as MUIPopperProps } from '@mui/material/Popper';
2626
import MUIClickAwayListener from '@mui/material/ClickAwayListener';
@@ -172,7 +172,7 @@ const baseSlots: GridBaseSlots = {
172172
baseTextField: BaseTextField,
173173
baseButton: MUIButton,
174174
baseIconButton: MUIIconButton,
175-
baseInputAdornment: MUIInputAdornment,
175+
baseInputAdornment: BaseInputAdornment,
176176
baseTooltip: MUITooltip,
177177
basePopper: BasePopper,
178178
baseInputLabel: MUIInputLabel,
@@ -463,3 +463,16 @@ function BaseSelectOption({ native, ...props }: NonNullable<GridSlotProps['baseS
463463
}
464464
return <MUIMenuItem {...props} />;
465465
}
466+
467+
function BaseInputAdornment(props: GridSlotProps['baseInputAdornment']) {
468+
return (
469+
<MUIInputAdornment
470+
sx={{
471+
[`&.${inputAdornmentClasses.positionEnd} .${iconButtonClasses.sizeSmall}`]: {
472+
marginRight: '-7px',
473+
},
474+
}}
475+
{...props}
476+
/>
477+
);
478+
}

0 commit comments

Comments
 (0)