Skip to content

Commit

Permalink
Bug 69121: cannot unsort by row in PivotTables. Part 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
IrinaMalysheva committed Aug 1, 2024
1 parent 6615488 commit 5b49315
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,7 @@ define([], function () {
this.radioNoSort = new Common.UI.RadioBox({
el: $('#id-sort-filter-radio-nosort'),
labelText: this.textNoSort,
name: 'asc-radio-sort',
checked: true
name: 'asc-radio-sort'
});
this.radioNoSort.on('change', _.bind(function(field, newValue) {
newValue && this.cmbFieldsAsc.setDisabled(true);
Expand Down Expand Up @@ -1003,13 +1002,17 @@ define([], function () {
idx = 1;
sort = this.properties.colFilter.asc_getSortState();
}
if (sort == null) {
this.radioAsc.setValue(true, true);
}
}

this.cmbFieldsAsc.setData(arr);
this.cmbFieldsAsc.setValue((idx>=0) ? idx : 0);
this.cmbFieldsDesc.setData(arr);
this.cmbFieldsDesc.setValue((idx>=0) ? idx : 0);

this.radioNoSort.setValue(sort == null, true);
this.radioDesc.setValue(sort == Asc.c_oAscSortOptions.Descending, true);
this.cmbFieldsDesc.setDisabled(sort !== Asc.c_oAscSortOptions.Descending);
this.cmbFieldsAsc.setDisabled(sort === Asc.c_oAscSortOptions.Descending);
Expand All @@ -1022,6 +1025,7 @@ define([], function () {
var filter = this.properties.filter;
if (filter) {
filter.asc_setSortState(null);
this.api.asc_applyAutoFilter(filter);
}
} else {
var combo = this.radioAsc.getValue() ? this.cmbFieldsAsc : this.cmbFieldsDesc;
Expand Down

0 comments on commit 5b49315

Please sign in to comment.