|
@@ -20,6 +20,11 @@ class DashboardModal extends React.Component {
|
|
this.uninstallPlugin(prevProps)
|
|
this.uninstallPlugin(prevProps)
|
|
this.installPlugin()
|
|
this.installPlugin()
|
|
}
|
|
}
|
|
|
|
+ if (prevProps.open && !this.props.open) {
|
|
|
|
+ this.plugin.closeModal()
|
|
|
|
+ } else if (!prevProps.open && this.props.open) {
|
|
|
|
+ this.plugin.openModal()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
componentWillUnmount () {
|
|
componentWillUnmount () {
|
|
@@ -55,14 +60,6 @@ class DashboardModal extends React.Component {
|
|
uppy.removePlugin(this.plugin)
|
|
uppy.removePlugin(this.plugin)
|
|
}
|
|
}
|
|
|
|
|
|
- componentWillReceiveProps (nextProps) {
|
|
|
|
- if (this.props.open && !nextProps.open) {
|
|
|
|
- this.plugin.closeModal()
|
|
|
|
- } else if (!this.props.open && nextProps.open) {
|
|
|
|
- this.plugin.openModal()
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
render () {
|
|
render () {
|
|
return h('div', {
|
|
return h('div', {
|
|
ref: (container) => {
|
|
ref: (container) => {
|