-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
myFiles doesn't get binded upon any change #227
Comments
Please provide a test case. It looks like you're not overwriting the |
I had the same issue binding to files did nothing. I ended up just using the <template>
<div>
<file-pond name="test" ref="pond" label-idle="Drop files here..." v-bind:allow-multiple="true" accepted-file-types="image/jpeg, image/png" v-on:updatefiles="updateFiles" />
</div>
</template>
<script>
// Import Vue FilePond
import vueFilePond from "vue-filepond";
// Import FilePond styles
import "filepond/dist/filepond.min.css";
// Import image preview plugin styles
import "filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css";
// Import image preview and file type validation plugins
import FilePondPluginFileValidateType from "filepond-plugin-file-validate-type";
import FilePondPluginImagePreview from "filepond-plugin-image-preview";
// Create component
const FilePond = vueFilePond(
FilePondPluginFileValidateType,
FilePondPluginImagePreview
);
export default {
name: "app",
data: function () {
return {
myFiles: []
};
},
methods: {
updateFiles(files) {
this.myFiles = files;
this.$root.$emit('updatePendingFiles', this.myFiles);
},
},
components: {
FilePond,
},
};
</script> |
Your issue is very simple, you're not using events but props, so your methods will never be called (the casing is also wrong) Instead of :init="handleFilePondInit"
:processFile="handleFilePondProcessfile"
:removeFile="handleFilePondRemovefile"
:addfile="handleOnaddfile" Use @init="handleFilePondInit"
@processfile="handleFilePondProcessfile"
@removefile="handleFilePondRemovefile"
@addfile="handleOnaddfile" |
Is there an existing issue for this?
Have you updated Vue FilePond, FilePond, and all plugins?
Describe the bug
myFiles object doesn't get binded after any change. I'm using V6 with Nuxt.js V2.
Reproduction
Created a component including user profile form, and added this component to it in the right fields.
Environment
The text was updated successfully, but these errors were encountered: