diff --git a/src/lib/form/useOnSubmit.ts b/src/lib/form/useOnSubmit.ts index fc97a6d1..7e21b022 100644 --- a/src/lib/form/useOnSubmit.ts +++ b/src/lib/form/useOnSubmit.ts @@ -56,7 +56,7 @@ export const useOnSubmitEdit = ({ success: true, }) queryClient.invalidateQueries({ - queryKey: [{ resource: getSectionPath(section) }], + queryKey: [{ resource: section.namePlural }], }) navigate(`/${getSectionPath(section)}`) }, @@ -114,7 +114,7 @@ export const useOnSubmitNew = ({ success: true, }) queryClient.invalidateQueries({ - queryKey: [{ resource: getSectionPath(section) }], + queryKey: [{ resource: section.namePlural }], }) navigate(`/${getSectionPath(section)}`) }, diff --git a/src/pages/organisationUnits/list/OrganisationUnitList.tsx b/src/pages/organisationUnits/list/OrganisationUnitList.tsx index 58954413..b35f83d0 100644 --- a/src/pages/organisationUnits/list/OrganisationUnitList.tsx +++ b/src/pages/organisationUnits/list/OrganisationUnitList.tsx @@ -250,19 +250,6 @@ export const OrganisationUnitList = () => { - setParentIdsToLoad((prev) => { - const { [id]: wasShown, ...withoutId } = - prev - if (wasShown) { - return withoutId - } - return { ...prev, [id]: true } - }) - } - showAllActive={ - parentIdsToLoad[row.original.id] === true - } onShowDetailsClick={handleDetailsClick} isFiltering={isFiltering} hasErrored={hasErrored} diff --git a/src/pages/organisationUnits/list/OrganisationUnitRow.tsx b/src/pages/organisationUnits/list/OrganisationUnitRow.tsx index c68ad9dc..cb42a8c3 100644 --- a/src/pages/organisationUnits/list/OrganisationUnitRow.tsx +++ b/src/pages/organisationUnits/list/OrganisationUnitRow.tsx @@ -18,16 +18,12 @@ import { OrganisationUnitListActions } from './OrganisationUnitListActions' export const OrganisationUnitRow = ({ row, - toggleShowAll, - showAllActive, isFiltering, fetchNextPage, onShowDetailsClick, hasErrored, }: { row: Row - toggleShowAll: (id: string) => void - showAllActive: boolean isFiltering: boolean fetchNextPage: (id: string) => void onShowDetailsClick: (model: BaseListModel) => void @@ -47,26 +43,6 @@ export const OrganisationUnitRow = ({ > {row.getCanExpand() ? ( <> - {isFiltering && - (showAllActive || - row.original.childCount !== - row.subRows.length) && ( - - )}