From cf1764ffa875c5bc2d28f3b67253b4086882d401 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 25 Sep 2024 17:57:43 +0300 Subject: [PATCH] [SSE] Fix moving fields in pivot table --- apps/spreadsheeteditor/main/app/view/PivotSettings.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/PivotSettings.js b/apps/spreadsheeteditor/main/app/view/PivotSettings.js index f1966c9e2c..f874c1617a 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotSettings.js +++ b/apps/spreadsheeteditor/main/app/view/PivotSettings.js @@ -891,19 +891,20 @@ define([ onMoveTo: function(type, pivotindex, to) { if (this.api && !this._locked && this._state.field){ var pivotIndex = _.isNumber(pivotindex) ? pivotindex : this._state.field.record.get('pivotIndex'), - index = _.isNumber(to) ? to : ((this._state.field.type==2) ? this._state.field.record.get('index') : undefined); + index = _.isNumber(to) ? to : undefined, + dataIndex = (this._state.field.type==2) ? this._state.field.record.get('index') : undefined; switch (type) { case 0: - this._originalProps.asc_moveToColField(this.api, pivotIndex, index); + this._originalProps.asc_moveToColField(this.api, pivotIndex, dataIndex, index); break; case 1: - this._originalProps.asc_moveToRowField(this.api, pivotIndex, index); + this._originalProps.asc_moveToRowField(this.api, pivotIndex, dataIndex, index); break; case 2: - this._originalProps.asc_moveToDataField(this.api, pivotIndex, index); + this._originalProps.asc_moveToDataField(this.api, pivotIndex, dataIndex, index); break; case 3: - this._originalProps.asc_moveToPageField(this.api, pivotIndex, index); + this._originalProps.asc_moveToPageField(this.api, pivotIndex, dataIndex, index); break; } Common.NotificationCenter.trigger('edit:complete', this);