Merge pull request #2951 from urbit/m/dbug-searchlist-keys

dbug fe: coax searchable list key into string
This commit is contained in:
Fang 2020-05-29 13:25:39 +02:00 committed by GitHub
commit 8b9ea7870c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ export class SearchableList extends Component {
let items = props.items.filter(item => { let items = props.items.filter(item => {
return state.query.split(' ').reduce((match, query) => { return state.query.split(' ').reduce((match, query) => {
return match && item.key.includes(query); return match && ('' + item.key).includes(query);
}, true); }, true);
}) })
items = items.map(item => items = items.map(item =>
@ -46,4 +46,4 @@ export class SearchableList extends Component {
<div>{items.length === 0 ? 'none' : items}</div> <div>{items.length === 0 ? 'none' : items}</div>
</div>); </div>);
} }
} }