Skip to content
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

[Bug??] custom label-idle not working #290

Open
2 tasks done
biladina opened this issue Jan 11, 2024 · 0 comments
Open
2 tasks done

[Bug??] custom label-idle not working #290

biladina opened this issue Jan 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@biladina
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Have you updated Vue FilePond, FilePond, and all plugins?

  • I have updated FilePond and its plugins

Describe the bug

I need to custom label-idle property so I can show to user how much file that they can apply..

expected result:
variable printed at label-idle property
Untitled

what I get instead:
variable printed as string at label-idle property
Untitled1

Reproduction

this is my source:

<script>
import vueFilePond from 'vue-filepond';
import 'filepond/dist/filepond.min.css';

// Import image preview plugin styles
import FilePondPluginImagePreview from "filepond-plugin-image-preview";
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";

const FilePond = vueFilePond(
  FilePondPluginFileValidateType,
  FilePondPluginImagePreview
);

export default {
  components: {
    FilePond
  },

  data() {
    return {
      maxFiles: 3,
      files: [],
    }
  },

  methods: {
    handleFilesUpload(files) {
      const vm = this;
      this.files = files.map(files => files.file);
      vm.$emit('handleFiles', vm.files);
    },
  },
};
</script>
<template>
  <FilePond
    name="files"
    ref="files"
    class-name="class-pond"
    label-idle='Letakkan file disini, maksimal {{maxFiles}} file'
    allow-multiple="true"
    instant-upload="false"
    :maxFiles="maxFiles"
    accepted-file-types="image/jpeg, image/png"
    v-bind:files="files"
    v-on:updatefiles="handleFilesUpload"
  />
</template>

Environment

- Device: Thinkpad Laptop
- OS: Fedora 38
- Broser: Firefox ESR 115.6.0
- Vue version: Vue 3
@biladina biladina added the bug Something isn't working label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant