Commit 8ab1f98 1 parent 166d77d commit 8ab1f98 Copy full SHA for 8ab1f98
File tree 1 file changed +3
-0
lines changed
src/main/webapp/ui/src/eln/gallery
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
11
11
filenameExceptExtension ,
12
12
justFilenameExtension ,
13
13
} from "../../util/files" ;
14
+ import { useGallerySelection } from "./useGallerySelection" ;
14
15
15
16
export opaque type Id = number ;
16
17
export function idToString ( id : Id ) : string {
@@ -195,6 +196,7 @@ export function useGalleryListing({
195
196
defaultPath ?? [ ]
196
197
) ;
197
198
const [ parentId , setParentId ] = React . useState < Result < Id >> ( Result . Error ( [ ] ) ) ;
199
+ const selection = useGallerySelection ( ) ;
198
200
199
201
function emptyReason ( ) : string {
200
202
if ( path . length > 0 ) {
@@ -261,6 +263,7 @@ export function useGalleryListing({
261
263
}
262
264
263
265
async function getGalleryFiles ( ) : Promise < void > {
266
+ selection . clear ( ) ;
264
267
setGalleryListing ( [ ] ) ;
265
268
setLoading ( true ) ;
266
269
try {
You can’t perform that action at this time.
0 commit comments