Enabling search by name in Token List
This commit is contained in:
parent
99b3eb8f04
commit
ef2f1c991e
|
@ -38,7 +38,10 @@ type State = {
|
|||
}
|
||||
|
||||
const filterBy = (filter: string, tokens: List<Token>): List<Token> =>
|
||||
tokens.filter((token: Token) => !filter || token.get('symbol').toLowerCase().startsWith(filter.toLowerCase()))
|
||||
tokens.filter((token: Token) => !filter ||
|
||||
token.get('symbol').toLowerCase().includes(filter.toLowerCase()) ||
|
||||
token.get('name').toLowerCase().includes(filter.toLowerCase()))
|
||||
|
||||
|
||||
class Tokens extends React.Component<Props, State> {
|
||||
state = {
|
||||
|
|
Loading…
Reference in New Issue