Fix Input component doesn't work if autoComplete=false (#1939)
The Input component doesn't work if its autoComplete prop is set to false, as described here: https://groups.google.com/g/zotero-dev/c/vKdxvZJL8UQ
This commit is contained in:
parent
cd63f96eee
commit
05e56acf77
1 changed files with 3 additions and 3 deletions
|
@ -68,8 +68,8 @@ class Input extends React.PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChange({ target }, options) {
|
handleChange({ target }, { newValue } = {}) {
|
||||||
var newValue = options.newValue || target.value;
|
newValue = newValue || target.value;
|
||||||
this.setState({
|
this.setState({
|
||||||
value: newValue,
|
value: newValue,
|
||||||
});
|
});
|
||||||
|
@ -281,4 +281,4 @@ class Input extends React.PureComponent {
|
||||||
|
|
||||||
export default React.forwardRef((props, ref) => <Input
|
export default React.forwardRef((props, ref) => <Input
|
||||||
innerRef={ref} {...props}
|
innerRef={ref} {...props}
|
||||||
/>);
|
/>);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue