panels
Description
Optional. Defines initially opened folder and selected files/foldersUsage
panels?: [{
path: string,
selected: string[]
}]
Parameters
path
- (required) a path to the initially opened folder. By default, the path is set to the "/" value (root folder)selected
- (required) an array of strings, where each string is a path to the file or folder entity that should be marked as selected; no items are selected by default
Example
<script>
import { getData, getDrive } from "./common/data";
import { Filemanager } from "wx-svelte-filemanager";
const panels = [
{
path: "/Code",
selected: ["/Code/Datepicker"],
},
{
path: "/",
selected: ["/Music", "/Code"],
},
];
</script>
<Filemanager
data={getData()}
drive={getDrive()}
mode={'panels'}
{panels} />
Related articles: mode