You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
a.k.a. replace `props.initialValue` with `props.value`. This change makes the
behaviour of Autocomplete closer to that of native input elements, i.e. you are
forced to always supply the current value which the input should display, and
the element will provide the updated value via the `onChange` callback (and
`onSelect`).
Upgrade path:
Before:
```js
class MyWidget extends Component {
render() {
return (
<Autocomplete
initialValue="hello"
/>
)
}
}
```
After:
```js
class MyWidget extends Component {
constructor() {
this.state = { value: 'hello' }
}
render() {
return (
<Autocomplete
value={this.state.value}
onChange={event => this.setState({ value: event.target.value })}
onSelect={value => this.setState({ value })}
/>
)
}
}
```
This is obviously a breaking change.
Closes#49
0 commit comments