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>
|
</Measure>
|
||||||
}
|
}
|
||||||
{ listLength === 0 &&
|
{ listLength === 0 && this.props.filterTerm !== '' &&
|
||||||
<div className={ styles.emptyState }>
|
<div className={ styles.emptyState }>
|
||||||
<i className="pokemon-missing-no" />
|
<i className="pokemon-missing-no" />
|
||||||
<h3>{ DEFAULT_POKEMON_NAME }</h3>
|
<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);
|
const onClick = () => this.props.handleActivatePokemon(pokemon.id, pokemon.form);
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
key={ index + pokemon.id }
|
key={ `${index}-${pokemon.id}-${pokemon.form}` }
|
||||||
style={ style }
|
style={ style }
|
||||||
className={ anchorCss }
|
className={ anchorCss }
|
||||||
onClick={ onClick }
|
onClick={ onClick }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user