mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
dbug fe: coax searchable list key into string
includes() only works on strings, but we might pass in other types as keys.
This commit is contained in:
parent
53b919965f
commit
8d2aad0de2
@ -33,7 +33,7 @@ export class SearchableList extends Component {
|
||||
|
||||
let items = props.items.filter(item => {
|
||||
return state.query.split(' ').reduce((match, query) => {
|
||||
return match && item.key.includes(query);
|
||||
return match && ('' + item.key).includes(query);
|
||||
}, true);
|
||||
})
|
||||
items = items.map(item =>
|
||||
@ -46,4 +46,4 @@ export class SearchableList extends Component {
|
||||
<div>{items.length === 0 ? 'none' : items}</div>
|
||||
</div>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user