Skip to content

Commit

Permalink
added filepond-upload-reverted and filepond-upload-file-removed event.
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelhamiderrahmouni committed Jul 31, 2024
1 parent 8f30a39 commit cb04aff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions resources/views/upload.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ class="{{ $attributes->get('class') }}"
$dispatch('filepond-upload-finished', {'{{ $wireModelAttribute }}', response });
}, error, progress);
},
revert: (filename, load) => {
@this.revert('{{ $wireModelAttribute }}', filename, load);
revert: async (filename, load) => {
await @this.revert('{{ $wireModelAttribute }}', filename, load);
$dispatch('filepond-upload-reverted', '{{ $wireModelAttribute }}');
},
remove: (file, load) => {
remove: async (file, load) => {
console.log(file);
@this.remove('{{ $wireModelAttribute }}', file.name);
await @this.remove('{{ $wireModelAttribute }}', file.name);
load();
$dispatch('filepond-upload-file-removed', '{{ $wireModelAttribute }}');
},
},
labelIdle: @js($placeholder),
Expand Down

0 comments on commit cb04aff

Please sign in to comment.