feat: folder selection support in useMediaAsset and file widget (#706)

This commit is contained in:
2023-04-19 06:42:18 +02:00
committed by GitHub
parent 0fae2ce73d
commit 23df691a0a
12 changed files with 98 additions and 25 deletions

View File

@ -52,6 +52,7 @@ export type MediaLibraryState = {
dynamicSearchActive?: boolean;
dynamicSearchQuery?: string;
forImage?: boolean;
forFolder?: boolean;
isPersisting?: boolean;
isDeleting?: boolean;
hasNextPage?: boolean;
@ -76,6 +77,7 @@ function mediaLibrary(
const {
controlID,
forImage,
forFolder,
config,
collection,
collectionFile,
@ -91,6 +93,7 @@ function mediaLibrary(
...state,
isVisible: true,
forImage: Boolean(forImage),
forFolder: Boolean(forFolder),
controlID,
config: libConfig,
collection,