Skip to content

Commit

Permalink
[INTERNAL][FIX] Table: Remove column "app defaults" logic
Browse files Browse the repository at this point in the history
Change-Id: I7ecd4ce792b4f186a95f5f00534484e702e4851f
BCP: 1980256736
CR-Id: 002075125900003537852019
  • Loading branch information
stoyanovski committed May 21, 2019
1 parent 37e10e5 commit d323796
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
34 changes: 0 additions & 34 deletions src/sap.ui.table/src/sap/ui/table/Column.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,35 +522,6 @@ function(
return this._defaultMenu;
};

Column.prototype._setAppDefault = function(sProperty, mValue) {
if (!this._appDefaults) {
this._appDefaults = {};
}

if (sProperty == "sorted") {
this._appDefaults.sorted = mValue;
} else if (sProperty == "sortOrder") {
this._appDefaults.sortOrder = mValue;
} else if (sProperty == "filtered") {
this._appDefaults.filtered = mValue;
} else if (sProperty == "filterValue") {
this._appDefaults.filterValue = mValue;
} else if (sProperty == "filterOperator") {
this._appDefaults.filterOperator = mValue;
}
};

Column.prototype._restoreAppDefaults = function() {
if (this._appDefaults) {
this.setProperty("sorted", this._appDefaults.sorted, true);
this.setProperty("sortOrder", this._appDefaults.sortOrder, true);
this.setProperty("filtered", this._appDefaults.filtered, true);
this.setProperty("filterValue", this._appDefaults.filterValue, true);
this.setProperty("filterOperator", this._appDefaults.filterOperator, true);
this._updateIcons();
}
};

/*
* @see JSDoc generated by SAPUI5 control API generator
*/
Expand All @@ -565,7 +536,6 @@ function(
*/
Column.prototype.setSorted = function(bFlag) {
this.setProperty("sorted", bFlag, true);
this._setAppDefault("sorted", bFlag);
this._updateIcons();
return this;
};
Expand All @@ -575,7 +545,6 @@ function(
*/
Column.prototype.setSortOrder = function(tSortOrder) {
this.setProperty("sortOrder", tSortOrder, true);
this._setAppDefault("sortOrder", tSortOrder);
this._updateIcons();
return this;
};
Expand All @@ -593,7 +562,6 @@ function(
*/
Column.prototype.setFiltered = function(bFlag) {
this.setProperty("filtered", bFlag, true);
this._setAppDefault("filtered", bFlag);
this._updateIcons();
return this;
};
Expand All @@ -603,7 +571,6 @@ function(
*/
Column.prototype.setFilterValue = function(sValue) {
this.setProperty("filterValue", sValue, true);
this._setAppDefault("filterValue", sValue);

var oMenu = this.getMenu();
if (this._bMenuIsColumnMenu) {
Expand All @@ -617,7 +584,6 @@ function(
* @see JSDoc generated by SAPUI5 control API generator
*/
Column.prototype.setFilterOperator = function(sValue) {
this._setAppDefault("filterOperator", sValue);
return this.setProperty("filterOperator", sValue, true);
};

Expand Down
12 changes: 0 additions & 12 deletions src/sap.ui.table/src/sap/ui/table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,6 @@ sap.ui.define([
var vReturn = Element.prototype.unbindAggregation.call(this, sName, bSuppressReset);

if (sName === "rows" && oBinding) {
this._restoreAppDefaultsColumnHeaderSortFilter();
this._invalidateColumnMenus(); // Metadata might change.

if (!this._bRowsBeingBound) {
Expand Down Expand Up @@ -3912,17 +3911,6 @@ sap.ui.define([
this._iSourceRowIndex = undefined;
};

/**
*
* @private
*/
Table.prototype._restoreAppDefaultsColumnHeaderSortFilter = function () {
var aColumns = this.getColumns();
jQuery.each(aColumns, function(iIndex, oColumn){
oColumn._restoreAppDefaults();
});
};

Table.prototype.setBusy = function (bBusy, sBusySection) {
var bBusyChanged = this.getBusy() != bBusy;

Expand Down

0 comments on commit d323796

Please sign in to comment.