It's working now: I think it was a caching issue?
<div>
<button wire:click="upload" class="btn btn-primary">Upload</button>
{{-- <input wire:model="newDocument" type="file"> --}}
@error('newDocument')
{{ $message }}
@enderror
<div wire:ignore x-data x-init="
FilePond.setOptions({
server: {
process: (fieldName, file, metadata, load, error, progress, abort, transfer, options) => {
@this.upload('newDocument', file, load, error, progress)
},
revert: (filename, load) => {
@this.removeUpload('newDocument', filename, load)
},
},
});
var Pond = FilePond.create($refs.input);
this.addEventListener('pondReset', e => {
Pond.removeFiles();
});
">
<input wire:model="newDocument" type="file" x-ref="input">
</div>
<ul class="list-group">
@foreach ($event->documents as $document)
<li class="list-group-item d-flex justify-content-between align-items-center">
<a wire:click.prevent="$emitTo('admin.courses.show-document', 'selectedDocument', '{{ $document->id }}')"
href="#" target="_blank"><i class='far fa-file-pdf'></i>{{ $document->name }}</a>
{{-- <span class="badge bg-primary rounded-pill">14</span> --}}
</li>
@endforeach
</ul>
</div>