diff --git a/api/js/etemplate/Et2Vfs/Et2VfsSelectDialog.md b/api/js/etemplate/Et2Vfs/Et2VfsSelectDialog.md new file mode 100644 index 0000000000..8427a0b3ee --- /dev/null +++ b/api/js/etemplate/Et2Vfs/Et2VfsSelectDialog.md @@ -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(); +``` diff --git a/api/js/etemplate/Et2Vfs/Et2VfsSelectDialog.ts b/api/js/etemplate/Et2Vfs/Et2VfsSelectDialog.ts index ec65b4a39f..f94c70bb61 100644 --- a/api/js/etemplate/Et2Vfs/Et2VfsSelectDialog.ts +++ b/api/js/etemplate/Et2Vfs/Et2VfsSelectDialog.ts @@ -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