Giter Site home page Giter Site logo

Comments (9)

jaseeey avatar jaseeey commented on May 24, 2024 2

This appears to be happening because the clickable event is registered on .dropzone__message, and when there are multiple elements with the same class, it's re-registering it on the first one.

I've pushed up a PR which instead uses the class/value passed in dropzoneMessageClassName to register the event. You will need to pass in a custom message class name, i.e. dropzone-message-class-name="dropzone__message--my_custom_class", which is unique for each instance. There might be a better way to do it, but this satisfies my use case.

In the meantime, feel free to use npm i @jaseeey/dropzone-vue until the issue is addressed. I've just done this now, hopefully no issues :)

from drop-zone.

Igor-Golovtsov avatar Igor-Golovtsov commented on May 24, 2024 1

When i use dropzoneRef, i have error

Uncaught (in promise) TypeError: Cannot read property 'classList' of undefined
    at eval (dropzone-vue.common.js?cd1f:6)
    at Array.forEach (<anonymous>)
    at initHiddenFileInput (dropzone-vue.common.js?cd1f:6)
    at eval (dropzone-vue.common.js?cd1f:6)
    at callWithErrorHandling (runtime-core.esm-bundler.js?5c40:6990)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js?5c40:6999)
    at Array.hook.__weh.hook.__weh (runtime-core.esm-bundler.js?5c40:2270)
    at flushPostFlushCbs (runtime-core.esm-bundler.js?5c40:7191)
    at flushJobs (runtime-core.esm-bundler.js?5c40:7228)

but, without dropzoneRef everything is fine

from drop-zone.

dweblaravel avatar dweblaravel commented on May 24, 2024 1

use the different class names for each instance. you can use the dropzoneClassName prop for change. It helps me.

from drop-zone.

darknessnerd avatar darknessnerd commented on May 24, 2024

I'll check on the weekend ^^

from drop-zone.

darknessnerd avatar darknessnerd commented on May 24, 2024

in the DropZone.Vue component we should create a parameter for the ref or maybe we should create a random ref for each instance.
What should be better in your opinion?

from drop-zone.

Igor-Golovtsov avatar Igor-Golovtsov commented on May 24, 2024

It seems to me that the best choice is an optional parameter.

from drop-zone.

darknessnerd avatar darknessnerd commented on May 24, 2024

It's right the component should use the new ref in order to find some internal element. I'll try to fix it soon as possible

from drop-zone.

Inshal2018 avatar Inshal2018 commented on May 24, 2024

Is the issue resolved? I'm facing the same issue. Tried using different class names but didn't helped.

Thanks

from drop-zone.

darknessnerd avatar darknessnerd commented on May 24, 2024

fixed version 0.1.11

from drop-zone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.