mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 18:46:00 +00:00
improt into archive improvement
This commit is contained in:
@@ -240,15 +240,22 @@ export function FormArchiveFilesSelect({ folderName, name }) {
|
||||
return <FormReactSelect options={filesOptions} name={name} isMulti />;
|
||||
}
|
||||
|
||||
export function FormArchiveFolderSelect({ name, ...other }) {
|
||||
export function FormArchiveFolderSelect({ name, additionalFolders = [], ...other }) {
|
||||
const { setFieldValue } = useFormikContext();
|
||||
const folders = useArchiveFolders();
|
||||
const folderOptions = React.useMemo(
|
||||
() =>
|
||||
(folders || []).map((folder) => ({
|
||||
() => [
|
||||
...(folders || []).map((folder) => ({
|
||||
value: folder.name,
|
||||
label: folder.name,
|
||||
})),
|
||||
...additionalFolders
|
||||
.filter((x) => !(folders || []).find((y) => y.name == x))
|
||||
.map((folder) => ({
|
||||
value: folder,
|
||||
label: folder,
|
||||
})),
|
||||
],
|
||||
[folders]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user