Comments (9)
It seems that the function does exists :
https://github.com/paramaggarwal/react-dropzone/blob/master/index.js#L114
Can you please give an example how are you trying to implement?
from meteor-react-dropzone.
Hello.
Inside this function, it will state that 'fileInput.click()' is not a function.
open() {
var fileInput = this.refs.fileInput;
fileInput.value = null;
fileInput.click();
}
I am using it like this :
...
dropZoneClick(){
this.refs.dropzone.open();
},
...
....
<Dropzone
ref="dropzone"
onClick={this.dropZoneClick}
onDrop={this.dropZoneDrop}
className="drop-area__newitem">
<div className="plus">+</div>
</Dropzone>
....
Everything works perfectly by the way, except the onClick, I can drop anything in and it will handle it perfectly, even ... 700 files :P
If this helps:
Uncaught TypeError: fileInput.click is not a functionopen @ index.js:133onClick @ index.js:126executeDispatch @ react.browserify.js:3351SimpleEventPlugin.executeDispatch @ react.browserify.js:17627forEachEventDispatch @ react.browserify.js:3339executeDispatchesInOrder @ react.browserify.js:3360executeDispatchesAndRelease @ react.browserify.js:2727forEachAccumulated @ react.browserify.js:19658EventPluginHub.processEventQueue @ react.browserify.js:2934runEventQueueInBatch @ react.browserify.js:11172ReactEventEmitterMixin.handleTopLevel @ react.browserify.js:11198handleTopLevelImpl @ react.browserify.js:11284Mixin.perform @ react.browserify.js:18604ReactDefaultBatchingStrategy.batchedUpdates @ react.browserify.js:9612batchedUpdates @ react.browserify.js:16619ReactEventListener.dispatchEvent @ react.browserify.js:11378
2015-11-19 12:55:50.101 index.js:133 Uncaught TypeError: fileInput.click is not a functionopen @ index.js:133onClick @ index.js:126executeDispatch @ react.browserify.js:3351SimpleEventPlugin.executeDispatch @ react.browserify.js:17627forEachEventDispatch @ react.browserify.js:3339executeDispatchesInOrder @ react.browserify.js:3360executeDispatchesAndRelease @ react.browserify.js:2727forEachAccumulated @ react.browserify.js:19658EventPluginHub.processEventQueue @ react.browserify.js:2934runEventQueueInBatch @ react.browserify.js:11172ReactEventEmitterMixin.handleTopLevel @ react.browserify.js:11198handleTopLevelImpl @ react.browserify.js:11284Mixin.perform @ react.browserify.js:18604ReactDefaultBatchingStrategy.batchedUpdates @ react.browserify.js:9612batchedUpdates @ react.browserify.js:16619ReactEventListener.dispatchEvent @ react.browserify.js:11378
from meteor-react-dropzone.
Just added it to an existing app to text and it seems to work great at my end.
Here :
from meteor-react-dropzone.
I am puzzled.
I will try to figure it out on my end. I have absolutely no idea why this happens at the moment.
PS: what editor is that? Looks sexy, is it Atom? (what theme?)
from meteor-react-dropzone.
Yes its Atom, the theme I am using is One Dark.
To what I can understand of your issue, somehow your DOM .click() function is blocked, it might be due a clash caused by another package.
Do you mind publishing the packages you are using?
from meteor-react-dropzone.
Hello.
Somehow I missed your message, then life got in the way.
To honor your request:
Meteor packages used by this project, one per line.
Check this file (and the other files in this directory) into your repository.
'meteor add' and 'meteor remove' will edit this file for you,
but you can also edit it by hand.
meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
session # Client-side reactive dictionary for your app
jquery # Helpful client-side library
tracker # Meteor's client-side reactive programming library
standard-minifiers # JS/CSS minifiers run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code
insecure # Allow all DB writes from clients (for prototyping)
semantic:ui
flemay:less-autoprefixer
dburles:collection-helpers
matb33:collection-hooks
reywood:publish-composite
yasinuslu:blaze-meta
alanning:roles
dburles:factory
stevezhu:lodash
accounts-password
reactive-var
natestrauser:animate-css
momentjs:moment
#testing..
#velocity:html-reporter
#xolvio:cucumber
reactive-dict
kadira:flow-router
#kadira:blaze-layout
#meteorhacks:kadira
#meteorhacks:zones
#meteorhacks:kadira-profiler
react
#kadira:flow-router-ssr
kadira:react-layout
meteortoys:allthings
praneybehl:react-dropzone
cfs:standard-packages
cfs:gridfs
cfs:graphicsmagick
browser-policy
from meteor-react-dropzone.
Sorry mate but I can't figure what's wrong with your setup
from meteor-react-dropzone.
I fixed it using jQuery like this (Meteor has jQuery by default so theres no reason not to use it) :
open() {
let fileInput = $(React.findDOMNode(this.refs.fileInput));
fileInput.val(null);
fileInput.trigger('click');
},
from meteor-react-dropzone.
Glad you did.
from meteor-react-dropzone.
Related Issues (5)
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 meteor-react-dropzone.