[v9.0.x] Query History: Do not show "load more" button when query history item is deleted (#50097)
(cherry picked from commit 927b6e33c0)
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
This commit is contained in:
co-authored by
Piotr Jamróz
parent
8217167b03
commit
742abc8129
@@ -60,9 +60,10 @@ const updateRichHistoryState = ({ updatedQuery, deletedId }: SyncHistoryUpdatesO
|
||||
.map((query) => (query.id === updatedQuery?.id ? updatedQuery : query))
|
||||
// or remove
|
||||
.filter((query) => query.id !== deletedId);
|
||||
const deletedItems = item.richHistory.length - newRichHistory.length;
|
||||
dispatch(
|
||||
richHistoryUpdatedAction({
|
||||
richHistoryResults: { richHistory: newRichHistory, total: item.richHistoryTotal },
|
||||
richHistoryResults: { richHistory: newRichHistory, total: item.richHistoryTotal! - deletedItems },
|
||||
exploreId,
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user