I've tried calling it in componentDidMount() of the dialog, (like the example), but It is not working. I've had to move it to the onChange for the file input so that it actually updates the screen. I'm pretty sure the problem is that my File.Input field is in the modal rather than on the base part of the page, noting this here for others that have this problem. Would be really nice if this could somehow be integrated into the react-bootstrap so that these kinds of workaround aren't needed.
The code in the onChange handler looks like this:
if (this.customFileInit) {
bsCustomFileInput.destroy();
}
bsCustomFileInput.init();
this.customFileInit = true;
I've tried calling it in
componentDidMount()
of the dialog, (like the example), but It is not working. I've had to move it to the onChange for the file input so that it actually updates the screen. I'm pretty sure the problem is that my File.Input field is in the modal rather than on the base part of the page, noting this here for others that have this problem. Would be really nice if this could somehow be integrated into the react-bootstrap so that these kinds of workaround aren't needed.The code in the onChange handler looks like this: