Skip to content

Commit

Permalink
Merge branch 'feat-storage-browser/main' into feat-storage-browser/cl…
Browse files Browse the repository at this point in the history
…eanup-controls
  • Loading branch information
cshfang authored Nov 7, 2024
2 parents 3f7eab8 + bf16498 commit 6a387b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const testLocation: LocationState = {
type: 'PREFIX',
},
path: '',
key: 'item-b/',
key: 'item-b-key/',
};

const testStoreState = {
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('useLocationDetailView', () => {
refresh: true,
pageSize: EXPECTED_PAGE_SIZE,
},
prefix: 'item-b/',
prefix: 'item-b-key/',
});

const state = result.current;
Expand Down Expand Up @@ -275,7 +275,7 @@ describe('useLocationDetailView', () => {
expect(handleListMock).toHaveBeenCalledWith({
config,
options: { ...DEFAULT_LIST_OPTIONS, refresh: true },
prefix: 'item-b/',
prefix: 'item-b-key/',
});
});

Expand Down Expand Up @@ -551,7 +551,7 @@ describe('useLocationDetailView', () => {
delimiter: undefined,
search: { filterKey: 'key', query: 'moo' },
},
prefix: 'item-b/',
prefix: 'item-b-key/',
});
expect(handleStoreActionMock).toHaveBeenCalledWith({
type: 'RESET_LOCATION_ITEMS',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ export function useLocationDetailView(
delimiter: includeSubfolders ? undefined : listOptions.delimiter,
search: { query, filterKey: 'key' as const },
};

handleReset();
handleList({ config: getConfig(), prefix, options: searchOptions });
handleList({ config: getConfig(), prefix: key, options: searchOptions });
dispatchStoreAction({ type: 'RESET_LOCATION_ITEMS' });
},
};
Expand Down

0 comments on commit 6a387b1

Please sign in to comment.