Skip to content

Commit

Permalink
Fix InputProps defined in muiSearchTextFieldProps overwrited default …
Browse files Browse the repository at this point in the history
…InputProps (#824)
  • Loading branch information
igor-dnascript committed Dec 5, 2023
1 parent 1d207cb commit 03e7ca8
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ export const MRT_GlobalFilterTextField = <TData extends MRT_RowData>({
unmountOnExit
>
<TextField
inputProps={{
autoComplete: 'new-password', // disable autocomplete and autofill
...textFieldProps.inputProps,
}}
onChange={handleChange}
placeholder={localization.search}
size="small"
value={searchValue ?? ''}
variant="outlined"
{...textFieldProps}
InputProps={{
endAdornment: (
<InputAdornment position="end">
Expand Down Expand Up @@ -134,16 +144,6 @@ export const MRT_GlobalFilterTextField = <TData extends MRT_RowData>({
) as any),
}),
}}
inputProps={{
autoComplete: 'new-password', // disable autocomplete and autofill
...textFieldProps.inputProps,
}}
onChange={handleChange}
placeholder={localization.search}
size="small"
value={searchValue ?? ''}
variant="outlined"
{...textFieldProps}
inputRef={(inputRef) => {
searchInputRef.current = inputRef;
if (textFieldProps?.inputRef) {
Expand Down

1 comment on commit 03e7ca8

@vercel
Copy link

@vercel vercel bot commented on 03e7ca8 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.