Skip to content

Commit

Permalink
Revert "Support #32267 - Saved search doesn't remember the group"
Browse files Browse the repository at this point in the history
This reverts commit dfc4c54.
  • Loading branch information
brandonandre committed Nov 23, 2023
1 parent dfc4c54 commit ecd8d83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
17 changes: 7 additions & 10 deletions packages/dina-ui/components/storage/StorageFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,16 @@ export function StorageFilter({ onChange }: StorageFilterProps) {
]
: []),
...(groupNames
? [
{
id: -1234,
? groupNames.map((group, index) => {
return {
id: -index,
type: "FILTER_ROW" as const,
attribute: "group",
predicate: "IS" as const,
searchType: "EXACT_MATCH" as const,
value: groupNames.join(","),
attribute: {
allowRange: true,
name: "group"
}
}
]
value: group
};
})
: [])
]
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const mockGet = jest.fn<any, any>(async (path, params = {}) => {
case "collection-api/storage-unit":
if (
params.filter?.parentStorageUnit === null ||
params.filter?.rsql === "group=in=(aafc,cnc)"
params.filter?.rsql === "group==aafc;group==cnc"
) {
// Top-level units:
return { data: [STORAGE_A], meta: { totalResourceCount: 1 } };
Expand Down Expand Up @@ -158,7 +158,7 @@ describe("BrowseStorageTree component", () => {
// With no filter, gets the top-level units:
expect(mockGet).lastCalledWith("collection-api/storage-unit", {
filter: {
rsql: "group=in=(aafc,cnc)"
rsql: "group==aafc;group==cnc"
},
include: "storageUnitChildren,storageUnitType",
page: {
Expand All @@ -179,7 +179,7 @@ describe("BrowseStorageTree component", () => {
// With a filter, gets units from any level matching the search text:
expect(mockGet).lastCalledWith("collection-api/storage-unit", {
filter: {
rsql: "name==*test-search-text*;group=in=(aafc,cnc)"
rsql: "name==*test-search-text*;group==aafc;group==cnc"
},
include: "storageUnitChildren,storageUnitType",
page: {
Expand Down

0 comments on commit ecd8d83

Please sign in to comment.