fix(collection): use project root as folder tree root in selector

This commit is contained in:
yiling
2026-05-25 22:33:48 +08:00
parent 5037b27d81
commit 64cb85df78
6 changed files with 32 additions and 89 deletions
@@ -74,6 +74,7 @@ interface FileBrowserProps {
collection?: CollectionInfo
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onUpdateCollection?: (updates: { name?: string; filter?: any }) => void
rootFolderId?: string
}
type FileWithId = {
@@ -116,6 +117,7 @@ export function FileBrowser({
fieldVisibility,
collection,
onUpdateCollection,
rootFolderId,
}: FileBrowserProps) {
const [contextMenuItem, setContextMenuItem] = useState<AssetInfo | null>(null)
const [moveCopyMode, setMoveCopyMode] = useState<'move' | 'copy' | null>(null)
@@ -753,6 +755,7 @@ export function FileBrowser({
isRecentlyDeleted={isRecentlyDeleted}
collection={collection}
onUpdateCollection={onUpdateCollection}
rootFolderId={rootFolderId}
/>
)}
{displayStyle === 'list' ? (