Closed santicros closed 4 years ago
If it can help anyone, for now the fix I've found is to use the event listeners of the Filepond instance, not from Vue.
Something like:
const filepondsArray = document.getElementsByClassName(
"filepond--root"
);
filepondsArray.forEach((filepond) => {
filepond.addEventListener(
"FilePond:updatefiles",
this.listenFileChanges
);
});
And then I have a method:
methods: {
listenFileChanges(e) {
console.log("File modified event", e);
console.log("File modified, file detail", e.detail);
}
}
@santicros glad to read you found a workaround 👍
closed because inactive
Hello!!
I have a page with multiple dynamic instances of filepond, where the user should be able to add more or delete them (they are files for different sections).
I'm using the @updatefiles method, but is there a way to pass a custom id or get it from the filepond ref? Now I have it as @updatefiles=handleFilePondUpdateFile, but with this I don't know from which instance is the file coming from.
If i do @updatefiles=handleFilePondUpdateFile(id) i lose the information coming from updatefiles.
Thanks so much!