Fixed: Disable movie search button if none are listed

pull/9534/head
Bogdan 1 year ago
parent eab470c67f
commit b92e08b850

@ -21,7 +21,6 @@ function MovieIndexSearchButton(props: MovieIndexSearchButtonProps) {
const isSearching = useSelector(createCommandExecutingSelector(MOVIE_SEARCH)); const isSearching = useSelector(createCommandExecutingSelector(MOVIE_SEARCH));
const { const {
items, items,
totalItems,
}: MoviesAppState & MovieIndexAppState & ClientSideCollectionAppState = }: MoviesAppState & MovieIndexAppState & ClientSideCollectionAppState =
useSelector(createMovieClientSideCollectionItemsSelector('movieIndex')); useSelector(createMovieClientSideCollectionItemsSelector('movieIndex'));
@ -62,7 +61,7 @@ function MovieIndexSearchButton(props: MovieIndexSearchButtonProps) {
<PageToolbarButton <PageToolbarButton
label={isSelectMode ? searchSelectLabel : searchIndexLabel} label={isSelectMode ? searchSelectLabel : searchIndexLabel}
isSpinning={isSearching} isSpinning={isSearching}
isDisabled={!totalItems} isDisabled={!items.length}
iconName={icons.SEARCH} iconName={icons.SEARCH}
onPress={onPress} onPress={onPress}
/> />

Loading…
Cancel
Save