Pass room into Autocompleter

This commit is contained in:
David Baker 2017-11-02 18:15:26 +00:00
parent 6ad4bb80dd
commit 7f9967389d

View file

@ -62,7 +62,7 @@ export default class Autocomplete extends React.Component {
componentWillReceiveProps(newProps, state) {
if (this.props.room.roomId !== newProps.room.roomId) {
this.autocompleter.destroy();
this.autocompleter = new Autocompleter();
this.autocompleter = new Autocompleter(newProps.room);
}
// Query hasn't changed so don't try to complete it