Docs for Vfs select dialog

This commit is contained in:
nathan 2024-02-20 16:52:47 -07:00
parent 8ffbff03da
commit c9d89b348c
2 changed files with 26 additions and 2 deletions

View File

@ -0,0 +1,23 @@
You can get the files by:
### Widget value
The dialog will return values on submit back to the server
### Change event
When the selected file(s) change, the change event is fired
```js
const dialog = this.et2.getWidgetById("files");
dialog.addEventListener("change", this.handleFilesSelected);
```
### getComplete() Promise
When the user closes the dialog, getComplete() will return the selected files
```js
const dialog = this.et2.getWidgetById("files");
let files = await dialog.getComplete();
```

View File

@ -26,8 +26,9 @@ import {Et2VfsSelectRow} from "./Et2VfsSelectRow";
import {Et2VfsPath} from "./Et2VfsPath";
/**
* @summary Select files (including directories) from the VFS
* @since 23.1
* @summary Select files (including directories) from the VFS.
*
* The dialog does not do anything with the files, just handles the UI to select file.
*
* @dependency et2-box
* @dependency et2-button