From 0b3ec67a53e7b11bd90b6aebf04f4fa973e6f278 Mon Sep 17 00:00:00 2001 From: Frederic Bahr <43925257+fredericbahr@users.noreply.github.com> Date: Sat, 21 Dec 2024 17:06:56 +0100 Subject: [PATCH] fix: overlapping input label when filter select is outline As stated in the API Documentation of MUI https://mui.com/material-ui/api/select/#props the label should be shrunk when display empty is true. I do not know why we need the display empty. If we remove it, the error also is removed. So you should consider what the use-case for displayEmpty really is. Fixes: https://github.com/KevinVandy/material-react-table/issues/1142 --- .../src/components/inputs/MRT_FilterTextField.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/material-react-table/src/components/inputs/MRT_FilterTextField.tsx b/packages/material-react-table/src/components/inputs/MRT_FilterTextField.tsx index 7e21af64a..02b9eb8e1 100644 --- a/packages/material-react-table/src/components/inputs/MRT_FilterTextField.tsx +++ b/packages/material-react-table/src/components/inputs/MRT_FilterTextField.tsx @@ -486,7 +486,9 @@ export const MRT_FilterTextField = ({ ) : undefined, - ...commonTextFieldProps.SelectProps, + }, + inputLabel: { + shrink: isSelectFilter || isMultiSelectFilter, }, }} onChange={handleTextFieldChange}