diff --git a/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.effects.ts b/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.effects.ts index 7152cd6a44..a941cb9600 100644 --- a/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.effects.ts +++ b/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.effects.ts @@ -14,6 +14,7 @@ import { selectSortKey, selectSortAs, selectSearchString, + selectIsAllFlagsFetched, } from './feature-flags.selectors'; import { DialogService } from '../../../shared/services/common-dialog.service'; @@ -36,9 +37,12 @@ export class FeatureFlagsEffects { this.store$.pipe(select(selectTotalFlags)), this.store$.pipe(select(selectSearchKey)), this.store$.pipe(select(selectSortKey)), - this.store$.pipe(select(selectSortAs)) + this.store$.pipe(select(selectSortAs)), + this.store$.pipe(select(selectIsAllFlagsFetched)) ), - filter(([fromStarting, skip, total]) => skip < total || total === null || fromStarting), + filter(([fromStarting, skip, total, searchKey, sortKey, sortAs, isAllFlagsFetched]) => { + return !isAllFlagsFetched || skip < total || total === null || fromStarting; + }), tap(() => { this.store$.dispatch(FeatureFlagsActions.actionSetIsLoadingFeatureFlags({ isLoadingFeatureFlags: true })); }), diff --git a/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.reducer.ts b/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.reducer.ts index ab066d0e39..1aed40b758 100644 --- a/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.reducer.ts +++ b/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.reducer.ts @@ -26,11 +26,6 @@ export const initialState: FeatureFlagState = adapter.getInitialState({ const reducer = createReducer( initialState, - // Feature Flags Fetching Actions - on(FeatureFlagsActions.actionFetchFeatureFlags, (state) => ({ - ...state, - isLoadingFeatureFlags: true, - })), on(FeatureFlagsActions.actionFetchFeatureFlagsSuccess, (state, { flags, totalFlags }) => { const newState: FeatureFlagState = { ...state, diff --git a/frontend/projects/upgrade/src/app/features/dashboard/feature-flags/pages/feature-flag-root-page/feature-flag-root-page-content/feature-flag-root-section-card/feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.html b/frontend/projects/upgrade/src/app/features/dashboard/feature-flags/pages/feature-flag-root-page/feature-flag-root-page-content/feature-flag-root-section-card/feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.html index b8686c982d..0c5c75b090 100644 --- a/frontend/projects/upgrade/src/app/features/dashboard/feature-flags/pages/feature-flag-root-page/feature-flag-root-page-content/feature-flag-root-section-card/feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.html +++ b/frontend/projects/upgrade/src/app/features/dashboard/feature-flags/pages/feature-flag-root-page/feature-flag-root-page-content/feature-flag-root-section-card/feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.html @@ -1,5 +1,5 @@