Comments (9)
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.
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.
use the different class names for each instance. you can use the dropzoneClassName prop for change. It helps me.
from drop-zone.
I'll check on the weekend ^^
from drop-zone.
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.
It seems to me that the best choice is an optional parameter.
from drop-zone.
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.
Is the issue resolved? I'm facing the same issue. Tried using different class names but didn't helped.
Thanks
from drop-zone.
fixed version 0.1.11
from drop-zone.
Related Issues (20)
- How would I support uploading using pre-signed URLs?
- show images in dropzone area getting from db
- How do I customize the text in the dropzone? HOT 2
- How am I gonna change the default text "Drop here" HOT 4
- What if I want the message zone to stay, even if a file has been added ? HOT 1
- How to get the uploaded images in an Array HOT 3
- Cannot find module 'drop-zone' or its corresponding type declarations. HOT 2
- How to capture server response after successful upload HOT 2
- ¿How can i rename file(s)?
- support for ts? Could not find a declaration file for module 'dropzone-vue'
- Can I define uploaded directory or can get uploaded data/image url?
- Can you give me some hints for implementation? HOT 1
- Demo doesn't work
- Could you please tell me how to change the default text "drop here"? HOT 1
- can i access files before they are sent to the server eg replace the URL with ref or v-model something like this
- No events catched
- Make delay between send files
- Any way to resize before uploading?
- custom Form data
- How to dynamic drop a file into the dropzone?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drop-zone.