Skip to content

Commit

Permalink
Move handleMouseDownClearButton out of component
Browse files Browse the repository at this point in the history
  • Loading branch information
jaytula committed Sep 2, 2019
1 parent ba707da commit ebbbe04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/ra-ui-materialui/src/input/ResettableTextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const useStyles = makeStyles({
},
});

const handleMouseDownClearButton = event => {
event.preventDefault();
};

/**
* An override of the default Material-UI TextField which is resettable
*/
Expand Down Expand Up @@ -52,10 +56,6 @@ function ResettableTextField({
[onChange]
);

const handleMouseDownClearButton = useCallback(event => {
event.preventDefault();
}, []);

const handleFocus = useCallback(
event => {
setShowClear(true);
Expand Down

0 comments on commit ebbbe04

Please sign in to comment.