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
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