Parcourir la source

fix(handsontable): display none 导致表头消失

qinlaiqiao il y a 4 ans
Parent
commit
16eef1ebc5

+ 1 - 1
handsontable/handsontable.d.ts

@@ -38,7 +38,7 @@ declare namespace _Handsontable {
 
     destroy(): void;
 
-    destroyEditor(revertOriginal?: boolean, prepareEditorIfNeeded?: boolean): void;
+    destroyEditor(revertOriginal?: boolean, prepareEditorIfNeeded?: boolean, isOutClick? : boolean): void;
 
     emptySelectedCells(): void;
 

+ 1 - 1
handsontable/package.json

@@ -10,7 +10,7 @@
     "url": "https://github.com/handsontable/handsontable/issues"
   },
   "author": "Handsoncode <hello@handsontable.com>",
-  "version": "6.3.8",
+  "version": "6.3.9",
   "browser": "dist/handsontable.js",
   "main": "commonjs/index.js",
   "module": "es/index.js",

Fichier diff supprimé car celui-ci est trop grand
+ 140 - 135
handsontable/src/core.js


+ 2 - 0
handsontable/src/plugins/contextMenu/menu.js

@@ -101,6 +101,8 @@ class Menu {
    */
   open() {
     this.runLocalHooks('beforeOpen');
+    // 2021-02-24  zhang createContainer里面先查找是否存在,有则返回。 如果不这样做的话,element-tabs 设置成lazy后,后加载的页面会冲掉之前页面的右键菜单
+    this.container = this.createContainer(this.options.name);
     this.container.removeAttribute('style');
     this.container.style.display = 'block';
 

+ 1 - 1
handsontable/src/tableView.js

@@ -170,7 +170,7 @@ function TableView(instance) {
     if (outsideClickDeselects) {
       instance.deselectCell();
     } else {
-      instance.destroyEditor(false, false);
+      instance.destroyEditor(false, false, true);
       instance.unlisten();// 点击tab等其它handsontable外的元素时,handsontable要解除监听键盘等事件. handsontable只在mouseup事件通过isOutsideInput只针对input 等几个输入元素
     }
   });