From 8b0b7c1cb0bc496a416236dd935a67e78f7d65e7 Mon Sep 17 00:00:00 2001 From: Stevie Robinson Date: Mon, 9 Dec 2024 04:36:10 +0100 Subject: [PATCH] New: Reactive search button on Wanted pages (cherry picked from commit e8c3aa20bd92701a16dcd97c5e103b79b3683105) Closes #10750 --- .../src/Wanted/CutoffUnmet/CutoffUnmet.js | 21 ++++++------------- .../CutoffUnmet/CutoffUnmetConnector.js | 5 +++-- frontend/src/Wanted/Missing/Missing.js | 19 ++++++----------- .../src/Wanted/Missing/MissingConnector.js | 5 +++-- 4 files changed, 18 insertions(+), 32 deletions(-) diff --git a/frontend/src/Wanted/CutoffUnmet/CutoffUnmet.js b/frontend/src/Wanted/CutoffUnmet/CutoffUnmet.js index 41bbb9a9e..be913d7bc 100644 --- a/frontend/src/Wanted/CutoffUnmet/CutoffUnmet.js +++ b/frontend/src/Wanted/CutoffUnmet/CutoffUnmet.js @@ -153,12 +153,15 @@ class CutoffUnmet extends Component { + + - - - - - - diff --git a/frontend/src/Wanted/CutoffUnmet/CutoffUnmetConnector.js b/frontend/src/Wanted/CutoffUnmet/CutoffUnmetConnector.js index ef3af7bf1..410b1a933 100644 --- a/frontend/src/Wanted/CutoffUnmet/CutoffUnmetConnector.js +++ b/frontend/src/Wanted/CutoffUnmet/CutoffUnmetConnector.js @@ -18,9 +18,10 @@ function createMapStateToProps() { return createSelector( (state) => state.wanted.cutoffUnmet, createCommandExecutingSelector(commandNames.CUTOFF_UNMET_MOVIES_SEARCH), - (cutoffUnmet, isSearchingForCutoffUnmetMovies) => { + createCommandExecutingSelector(commandNames.MOVIE_SEARCH), + (cutoffUnmet, isSearchingForCutoffUnmetMovies, isSearchingForSelectedCutoffUnmetMovies) => { return { - isSearchingForCutoffUnmetMovies, + isSearchingForCutoffUnmetMovies: isSearchingForCutoffUnmetMovies || isSearchingForSelectedCutoffUnmetMovies, isSaving: cutoffUnmet.items.filter((m) => m.isSaving).length > 1, ...cutoffUnmet }; diff --git a/frontend/src/Wanted/Missing/Missing.js b/frontend/src/Wanted/Missing/Missing.js index d88a12028..da243fb04 100644 --- a/frontend/src/Wanted/Missing/Missing.js +++ b/frontend/src/Wanted/Missing/Missing.js @@ -159,12 +159,15 @@ class Missing extends Component { + + - - - - state.wanted.missing, createCommandExecutingSelector(commandNames.MISSING_MOVIES_SEARCH), - (missing, isSearchingForMissingMovies) => { + createCommandExecutingSelector(commandNames.MOVIE_SEARCH), + (missing, isSearchingForMissingMovies, isSearchingForSelectedMissingMovies) => { return { - isSearchingForMissingMovies, + isSearchingForMissingMovies: isSearchingForMissingMovies || isSearchingForSelectedMissingMovies, isSaving: missing.items.filter((m) => m.isSaving).length > 1, ...missing };