Skip to content
Snippets Groups Projects
Commit 469a68ee authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Add event with the number of selected files in nextcloud filepicker

parent 0f2a815f
No related branches found
No related tags found
No related merge requests found
Pipeline #24070 passed
......@@ -101,6 +101,9 @@ This event is sent if a file was selected.
This event is sent if multiple files are selected.
#### `dbp-nextcloud-file-picker-number-files`
This event is sent from nextcloudfilepicker and is send when files are picked and sends the number of selected files
**Payload**: `{'file': File}` where [File](https://developer.mozilla.org/en-US/docs/Web/API/File) is the binary file that was selected
......
......@@ -435,6 +435,10 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
downloadFiles(files) {
files.forEach((fileData) => this.downloadFile(fileData));
this.tabulatorTable.deselectRow();
const data = {"count": files.length};
const event = new CustomEvent("dbp-nextcloud-file-picker-number-files",
{ "detail": data, bubbles: true, composed: true });
this.dispatchEvent(event);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment