From 99f970dce3635758ba02d28a9f8a8782552d9784 Mon Sep 17 00:00:00 2001 From: Frederic Bahr <43925257+fredericbahr@users.noreply.github.com> Date: Sun, 22 Dec 2024 18:53:59 +0100 Subject: [PATCH] fix: overlapping input label when filter select is outline (#1334) 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}