Skip to content

Commit

Permalink
allow selecting all kinds
Browse files Browse the repository at this point in the history
  • Loading branch information
benpankow committed Sep 6, 2024
1 parent 44637d5 commit f803e74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function useAssetCatalogFiltering<
const allKinds = useAssetKindsForAssets(assets);
const kindFilter = useKindFilter({
allAssetKinds: allKinds,
kinds: filters.selectAllFilters.includes('kinds') ? [] : filters.kinds,
kinds: filters.selectAllFilters.includes('kinds') ? allKinds : filters.kinds,
setKinds,
});

Expand Down Expand Up @@ -152,6 +152,7 @@ export function useAssetCatalogFiltering<
[
['owners', filters.owners, allAssetOwners] as const,
['tags', filters.tags, tags] as const,
['kinds', filters.kinds, allKinds] as const,
['groups', filters.groups, allAssetGroupOptions] as const,
['changedInBranch', filters.changedInBranch, Object.values(ChangeReason)] as const,
['codeLocations', filters.codeLocations, allRepos] as const,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const useKindFilter = ({
onStateChanged: (values) => {
setKinds?.(Array.from(values));
},
canSelectAll: false,
canSelectAll: true,
});
};

Expand Down

0 comments on commit f803e74

Please sign in to comment.