Skip to content

Commit

Permalink
Simplify ResettableTextField
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Jun 20, 2024
1 parent f9e3ebe commit 30c1858
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions packages/ra-ui-materialui/src/input/ResettableTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ResettableTextField = forwardRef(

const translate = useTranslate();

const { onChange, onFocus, onBlur } = props;
const { onChange } = props;
const handleClickClearButton = useCallback(
event => {
event.preventDefault();
Expand All @@ -39,20 +39,6 @@ export const ResettableTextField = forwardRef(
[onChange]
);

const handleFocus = useCallback(
event => {
onFocus && onFocus(event);
},
[onFocus]
);

const handleBlur = useCallback(
event => {
onBlur && onBlur(event);
},
[onBlur]
);

const {
clearButton,
clearIcon,
Expand Down Expand Up @@ -164,8 +150,6 @@ export const ResettableTextField = forwardRef(
margin={margin}
className={className}
{...rest}
onFocus={handleFocus}
onBlur={handleBlur}
inputRef={ref}
/>
);
Expand Down

0 comments on commit 30c1858

Please sign in to comment.