Add multiple property — enables multi-file picker selection
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tp/tp-dropzone",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"description": "",
|
||||
"main": "tp-dropzone.js",
|
||||
"scripts": {
|
||||
|
||||
+6
-1
@@ -36,13 +36,17 @@ class TpDropzone extends upload(dropzoneMixin(LitElement)) {
|
||||
render() {
|
||||
return html`
|
||||
<slot></slot>
|
||||
<input type="file" @change=${this._handleFileSelect}>
|
||||
<input type="file" ?multiple=${this.multiple} @change=${this._handleFileSelect}>
|
||||
`;
|
||||
}
|
||||
|
||||
static get properties() {
|
||||
return {
|
||||
url: { type: String },
|
||||
// Allow selecting several files in the picker dialog. The component's
|
||||
// own "file-selected" event still reports the first file — read the
|
||||
// change event's input.files for the full list.
|
||||
multiple: { type: Boolean },
|
||||
isDraggedOn: { type: Boolean, reflect: true },
|
||||
file: { type: Object, state: true }
|
||||
};
|
||||
@@ -51,6 +55,7 @@ class TpDropzone extends upload(dropzoneMixin(LitElement)) {
|
||||
constructor() {
|
||||
super();
|
||||
this.file = null;
|
||||
this.multiple = false;
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
|
||||
Reference in New Issue
Block a user