|
@@ -1238,9 +1238,10 @@ export default function Core(rootElement, userSettings, rootInstanceSymbol = fal
|
|
|
* @function destroyEditor
|
|
* @function destroyEditor
|
|
|
* @param {Boolean} [revertOriginal=false] If `true`, the previous value will be restored. Otherwise, the edited value will be saved.
|
|
* @param {Boolean} [revertOriginal=false] If `true`, the previous value will be restored. Otherwise, the edited value will be saved.
|
|
|
* @param {Boolean} [prepareEditorIfNeeded=true] If `true` the editor under the selected cell will be prepared to open.
|
|
* @param {Boolean} [prepareEditorIfNeeded=true] If `true` the editor under the selected cell will be prepared to open.
|
|
|
|
|
+ * @param {Boolean} [prepareEditorIfNeeded=false] 解决outsideClickDeselects为False时,切换tab导致表头行号等渲染出错问题,点击表格外部,并不需要重新刷新表格
|
|
|
*/
|
|
*/
|
|
|
- this.destroyEditor = function(revertOriginal = false, prepareEditorIfNeeded = true) {
|
|
|
|
|
- instance._refreshBorders(revertOriginal, prepareEditorIfNeeded);
|
|
|
|
|
|
|
+ this.destroyEditor = function(revertOriginal = false, prepareEditorIfNeeded = true,isOutClick = false) {
|
|
|
|
|
+ instance._refreshBorders(revertOriginal, prepareEditorIfNeeded, isOutClick);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -3580,10 +3581,11 @@ export default function Core(rootElement, userSettings, rootInstanceSymbol = fal
|
|
|
* @private
|
|
* @private
|
|
|
* @param {Boolean} [revertOriginal=false] If `true`, the previous value will be restored. Otherwise, the edited value will be saved.
|
|
* @param {Boolean} [revertOriginal=false] If `true`, the previous value will be restored. Otherwise, the edited value will be saved.
|
|
|
* @param {Boolean} [prepareEditorIfNeeded=true] If `true` the editor under the selected cell will be prepared to open.
|
|
* @param {Boolean} [prepareEditorIfNeeded=true] If `true` the editor under the selected cell will be prepared to open.
|
|
|
|
|
+ * @param {Boolean} [isOutClick=false] If `false` 重新刷新表格. If ture 说明是点击表格外不需要重新刷新
|
|
|
*/
|
|
*/
|
|
|
- this._refreshBorders = function(revertOriginal = false, prepareEditorIfNeeded = true) {
|
|
|
|
|
|
|
+ this._refreshBorders = function(revertOriginal = false, prepareEditorIfNeeded = true,isOutClick = false) {
|
|
|
editorManager.destroyEditor(revertOriginal);
|
|
editorManager.destroyEditor(revertOriginal);
|
|
|
- instance.view.render();
|
|
|
|
|
|
|
+ if( isOutClick===false ) instance.view.render();
|
|
|
|
|
|
|
|
if (prepareEditorIfNeeded && selection.isSelected()) {
|
|
if (prepareEditorIfNeeded && selection.isSelected()) {
|
|
|
editorManager.prepareEditor();
|
|
editorManager.prepareEditor();
|