mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-08 05:36:13 +02:00
Reset truncation when the text box is cleared
This commit is contained in:
parent
5dafe1f4a6
commit
7ccce1dc91
@ -81,6 +81,8 @@ var SearchableEntityList = React.createClass({
|
||||
var q = ev.target.value;
|
||||
this.setState({
|
||||
query: q,
|
||||
// reset truncation if they back out the entire text
|
||||
truncateAt: (q.length === 0 ? this.props.truncateAt : this.state.truncateAt),
|
||||
results: this.getSearchResults(q, this.props.entities)
|
||||
}, () => {
|
||||
// invoke the callback AFTER we've flushed the new state. We need to
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user