Fixed file group accept type issue..

This commit is contained in:
Cüneyt Şentürk 2022-06-02 17:16:34 +03:00
parent 4c86ba6f07
commit ff351be76e
4 changed files with 50 additions and 30 deletions

View File

@ -21,6 +21,16 @@ class File extends Form
*/
public function render()
{
if (! empty($this->options)) {
$options = [];
foreach ($this->options as $option) {
$options[$option->id] = $option->name;
}
$this->options = $options;
}
return view('components.form.group.file');
}
}

View File

@ -15,6 +15,16 @@ class Ffile extends Form
*/
public function render()
{
if (! empty($this->options)) {
$options = [];
foreach ($this->options as $option) {
$options[$option->id] = $option->name;
}
$this->options = $options;
}
return view('components.form.input.file');
}
}

View File

@ -246,7 +246,7 @@ export default {
watch: {
attachments: function (attachments) {
attachments.forEach((attachment) => {
if(attachment.length != undefined) {
if (attachment.length != undefined) {
var mockFile = {
id: attachment[0].id,
name: attachment[0].name,
@ -255,6 +255,7 @@ export default {
download: attachment[0].downloadPath,
dropzone: 'edit',
};
this.dropzone.emit("addedfile", mockFile);
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, attachment[0].path);
@ -271,7 +272,6 @@ export default {
this.onMaxFilesReached(this);
}
}, this);
},
},
}