bugfix
This commit is contained in:
parent
fb7ceb2e35
commit
30a3050c4c
@ -519,15 +519,16 @@ bricks.UiFile = class extends bricks.VBox {
|
||||
this.set_css('hover', true);
|
||||
var files = [];
|
||||
for (const f of event.dataTransfer.files) {
|
||||
if (this.opts.accept && f.type.startsWith(this.opts.accept)){
|
||||
files.push(f);
|
||||
if (this.opts.accept && ! f.type.startsWith(this.opts.accept)){
|
||||
continue;
|
||||
}
|
||||
files.push(f);
|
||||
};
|
||||
if (this.opts.multiple){
|
||||
this.value = files;
|
||||
this.set_input_file(files);
|
||||
} else {
|
||||
this.value = file[0];
|
||||
this.value = files[0];
|
||||
this.set_input_file([this.value]);
|
||||
}
|
||||
this.dispatch('changed', this.value);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user