diff --git a/app/packages/state/src/recoil/dynamicGroups.ts b/app/packages/state/src/recoil/dynamicGroups.ts index fcb5e5c37d8..f83ef869988 100644 --- a/app/packages/state/src/recoil/dynamicGroups.ts +++ b/app/packages/state/src/recoil/dynamicGroups.ts @@ -75,7 +75,7 @@ export const dynamicGroupPageSelector = selectorFamily< after: string | null; count: number; dataset: string; - filter: { group: { slice?: string } }; + filter: { group: { slice?: string; slices?: string[] } }; view: State.Stage[]; }, { modal: boolean; value: string } @@ -84,12 +84,18 @@ export const dynamicGroupPageSelector = selectorFamily< get: ({ modal, value }) => ({ get }) => { + const slice = get(modal ? modalGroupSlice : groupSlice); + const params = { dataset: get(datasetName), view: get(dynamicGroupViewQuery(value)), - filter: { group: { slice: get(modal ? modalGroupSlice : groupSlice) } }, + filter: { group: { slice } }, }; + if (get(hasGroupSlices)) { + params.filter.group.slices = [slice]; + } + return (cursor: number, pageSize: number) => ({ ...params, after: cursor ? String(cursor) : null,