From d14e3963923ff176e2751689ab769c3faed6ac16 Mon Sep 17 00:00:00 2001 From: asvarcas Date: Thu, 31 Oct 2019 14:13:18 -0300 Subject: [PATCH] InputAdronment added if resettable prop is pass when value is not set and there is not endAdornment. --- .../src/input/ResettableTextField.js | 63 +++++++++---------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/packages/ra-ui-materialui/src/input/ResettableTextField.js b/packages/ra-ui-materialui/src/input/ResettableTextField.js index 7d73691ca38..9827970b19e 100644 --- a/packages/ra-ui-materialui/src/input/ResettableTextField.js +++ b/packages/ra-ui-materialui/src/input/ResettableTextField.js @@ -1,4 +1,4 @@ -import React, { Fragment, useState, useCallback } from 'react'; +import React, { useState, useCallback } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import InputAdornment from '@material-ui/core/InputAdornment'; @@ -100,49 +100,46 @@ function ResettableTextField({ classes: { adornedEnd: props.select ? inputAdornedEnd : null }, endAdornment: resettable && value ? ( - - + - - - - - + /> + + ) : ( - endAdornment || ( + endAdornment || + (resettable && ( - + - ) + )) ), ...InputPropsWithoutEndAdornment, }}