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)
|
const [showClearButton, setShowClearButton] = useState(clear)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setShowClearButton(clear && field.value)
|
setShowClearButton(clear && field.value && !props.readOnly)
|
||||||
}, [field.value])
|
}, [field.value, props.readOnly])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in New Issue