only show empty state on search
This commit is contained in:
parent
e23a42fea7
commit
f053d72efa
@ -121,7 +121,7 @@ export class PokemonSelectList extends React.Component<IPokemonSelectListProps,
|
||||
}
|
||||
</Measure>
|
||||
}
|
||||
{ listLength === 0 &&
|
||||
{ listLength === 0 && this.props.filterTerm !== '' &&
|
||||
<div className={ styles.emptyState }>
|
||||
<i className="pokemon-missing-no" />
|
||||
<h3>{ DEFAULT_POKEMON_NAME }</h3>
|
||||
@ -160,7 +160,7 @@ export class PokemonSelectList extends React.Component<IPokemonSelectListProps,
|
||||
const onClick = () => this.props.handleActivatePokemon(pokemon.id, pokemon.form);
|
||||
return (
|
||||
<a
|
||||
key={ index + pokemon.id }
|
||||
key={ `${index}-${pokemon.id}-${pokemon.form}` }
|
||||
style={ style }
|
||||
className={ anchorCss }
|
||||
onClick={ onClick }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user