You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can see (in FileUpload.js)
propTypes: {
buttonLabelChange: React.PropTypes.string,
buttonLabelInitial: React.PropTypes.string,
disabled: React.PropTypes.bool,
file: React.PropTypes.object,
onChange: React.PropTypes.func
}
file can be sent in as props.
but in render there is no connection to this props but only to the file set in the components state.
So e.g. if user uses the FileDragAndDrop there is no way to inject the dropped file into the FileUpload component.
By changing in the render function to prioritize the props.file value, if set, this works nicely
var file = this.props.file || _state.file;
Don't know if this breaks anything else but I post it here if it here and hopefully it helps this great project and perhaps could be included in a future release
BR
Stefan
The text was updated successfully, but these errors were encountered:
Hi!
As far as I can see (in FileUpload.js)
propTypes: {
buttonLabelChange: React.PropTypes.string,
buttonLabelInitial: React.PropTypes.string,
disabled: React.PropTypes.bool,
file: React.PropTypes.object,
onChange: React.PropTypes.func
}
file can be sent in as props.
but in render there is no connection to this props but only to the file set in the components state.
So e.g. if user uses the FileDragAndDrop there is no way to inject the dropped file into the FileUpload component.
By changing in the render function to prioritize the props.file value, if set, this works nicely
var file = this.props.file || _state.file;
Don't know if this breaks anything else but I post it here if it here and hopefully it helps this great project and perhaps could be included in a future release
BR
Stefan
The text was updated successfully, but these errors were encountered: