diff --git a/src/components/FolderTree.tsx b/src/components/FolderTree.tsx index 0861e1ac5..082fd1147 100644 --- a/src/components/FolderTree.tsx +++ b/src/components/FolderTree.tsx @@ -195,7 +195,12 @@ export type ModalFolderChooseProps = { } export const ModalFolderChoose = (props: ModalFolderChooseProps) => { const t = useT() - const [value, setValue] = createSignal(props.defaultValue ?? "") + const [value, setValue] = createSignal(props.defaultValue ?? "/") + const [handler, setHandler] = createSignal() + createEffect(() => { + if (!props.opened) return + handler()?.setPath(value()) + }) return ( { {/* */} {t("home.toolbar.choose_dst_folder")} - + setHandler(h)} + autoOpen + />