pqina / vue-filepond

🔌 A handy FilePond adapter component for Vue
https://pqina.nl/filepond
MIT License
1.93k stars 128 forks source link

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

Open biladina opened 8 months ago

biladina commented 8 months ago

Is there an existing issue for this?

Have you updated Vue FilePond, FilePond, and all 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