From 5473b658bc2fc0ea8bf5e44ee264ef532deb2998 Mon Sep 17 00:00:00 2001 From: Alberto Espinoza Date: Fri, 17 Nov 2023 14:34:38 -0600 Subject: [PATCH] R2-2657 UX - Applying filters - Fixing snackbar after bulk assign --- .../components/record-actions/bulk-transtions/reducer.js | 3 ++- .../record-actions/transitions/components/reassign-form.jsx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/components/record-actions/bulk-transtions/reducer.js b/app/javascript/components/record-actions/bulk-transtions/reducer.js index 5cd9860b7b..21ea2890e9 100644 --- a/app/javascript/components/record-actions/bulk-transtions/reducer.js +++ b/app/javascript/components/record-actions/bulk-transtions/reducer.js @@ -27,7 +27,8 @@ export default namespace => return state .setIn([NAMESPACE, "loading"], false) .setIn([NAMESPACE, "data"], fromJS([])) - .setIn([NAMESPACE, "errors"], fromJS([])); + .setIn([NAMESPACE, "errors"], fromJS([])) + .setIn([NAMESPACE, "selectedRecordsLength"], 0); case `${namespace}/${actions.BULK_ASSIGN_USER_SELECTED_RECORDS_LENGTH}`: return state.setIn([NAMESPACE, "selectedRecordsLength"], fromJS(payload.selectedRecordsLength, 0)); default: diff --git a/app/javascript/components/record-actions/transitions/components/reassign-form.jsx b/app/javascript/components/record-actions/transitions/components/reassign-form.jsx index dc2770ab47..80586ffc8d 100644 --- a/app/javascript/components/record-actions/transitions/components/reassign-form.jsx +++ b/app/javascript/components/record-actions/transitions/components/reassign-form.jsx @@ -17,7 +17,6 @@ import SearchableSelect from "../../../searchable-select"; import { enqueueSnackbar } from "../../../notifier"; import { useI18n } from "../../../i18n"; import { applyFilters } from "../../../index-filters/action-creators"; -import { DEFAULT_FILTERS } from "../../../record-list/constants"; import { filterUsers } from "../utils"; import { useMemoizedSelector } from "../../../../libs"; import { getFiltersValuesByRecordType } from "../../../index-filters/selectors"; @@ -128,7 +127,7 @@ const ReassignForm = ({ dispatch( applyFilters({ recordType, - data: DEFAULT_FILTERS + data: appliedFilters }) ); };