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) {
|
||||
var newValue = options.newValue || target.value;
|
||||
handleChange({ target }, { newValue } = {}) {
|
||||
newValue = newValue || target.value;
|
||||
this.setState({
|
||||
value: newValue,
|
||||
});
|
||||
|
@ -281,4 +281,4 @@ class Input extends React.PureComponent {
|
|||
|
||||
export default React.forwardRef((props, ref) => <Input
|
||||
innerRef={ref} {...props}
|
||||
/>);
|
||||
/>);
|
||||
|
|
Loading…
Reference in a new issue