disable clear button if field is readonly
This commit is contained in:
parent
9c6e98b47b
commit
68dafa3684
|
@ -526,8 +526,8 @@ function InputInner ({
|
|||
|
||||
const [showClearButton, setShowClearButton] = useState(clear)
|
||||
useEffect(() => {
|
||||
setShowClearButton(clear && field.value)
|
||||
}, [field.value])
|
||||
setShowClearButton(clear && field.value && !props.readOnly)
|
||||
}, [field.value, props.readOnly])
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Reference in New Issue