Skip to content

Commit

Permalink
Merge pull request #3891 from tdeo/patch-4
Browse files Browse the repository at this point in the history
Tweak ResettableTextField adornment style
  • Loading branch information
djhi authored Oct 28, 2019
2 parents 859be39 + 32a1711 commit b9973de
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/ra-ui-materialui/src/input/ResettableTextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ const useStyles = makeStyles({
},
clearButton: {
height: 24,
padding: 0,
width: 0,
},
visibleClearButton: {
width: 24,
},
selectAdornment: {
marginRight: 12,
},
});

const handleMouseDownClearButton = event => {
Expand Down Expand Up @@ -86,7 +90,12 @@ function ResettableTextField({
value={value}
InputProps={{
endAdornment: resettable && value && (
<InputAdornment position="end">
<InputAdornment
position="end"
classes={{
root: props.select ? classes.selectAdornment : null,
}}
>
<IconButton
className={classNames(clearButton, {
[visibleClearButton]:
Expand Down

0 comments on commit b9973de

Please sign in to comment.