瀏覽代碼

hideAllPanels after a file is added in Dashboard, instead of toggleAddFilesPanel(false) that didn’t hide some panel

Artur Paikin 6 年之前
父節點
當前提交
5a2f8da5a4
共有 2 個文件被更改,包括 1 次插入4 次删除
  1. 1 1
      packages/@uppy/dashboard/src/index.js
  2. 0 3
      packages/@uppy/provider-views/src/index.js

+ 1 - 1
packages/@uppy/dashboard/src/index.js

@@ -462,7 +462,7 @@ module.exports = class Dashboard extends Plugin {
   }
 
   handleFileAdded () {
-    this.toggleAddFilesPanel(false)
+    this.hideAllPanels()
   }
 
   handleComplete ({ failed, uploadID }) {

+ 0 - 3
packages/@uppy/provider-views/src/index.js

@@ -516,9 +516,6 @@ module.exports = class ProviderView {
 
     this._loaderWrapper(Promise.all(promises), () => {
       this.clearSelection()
-
-      const dashboard = this.plugin.uppy.getPlugin('Dashboard')
-      if (dashboard) dashboard.hideAllPanels()
     }, () => {})
   }