@sapui5/sap.fe.templates 1.96.3 → 1.96.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -124,42 +124,42 @@ sap.ui.define(
|
|
|
124
124
|
var oView = this.getView(),
|
|
125
125
|
that = this,
|
|
126
126
|
oController = oView.getController(),
|
|
127
|
-
|
|
128
|
-
oAppComponent = sap.ui.core.Component.getOwnerComponentFor(oComponent),
|
|
127
|
+
oAppComponent = oController.getAppComponent(oView),
|
|
129
128
|
oComponentData = oAppComponent.getComponentData(),
|
|
130
129
|
oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
|
|
131
130
|
oVariantPromise = that.handleVariantIdPassedViaURLParams(oStartupParameters),
|
|
132
131
|
bFilterVariantApplied;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (aVariants
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
var oRes = that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
|
|
141
|
-
var oController = oView.getController();
|
|
142
|
-
var oDynamicPage = oView.byId("fe::ListReport");
|
|
143
|
-
var bPreventInitialSearch = false;
|
|
144
|
-
var oFilterBarVM = that._getFilterBarVM(oView);
|
|
145
|
-
var oFilterBarControl = oController._getFilterBarControl();
|
|
146
|
-
if (
|
|
147
|
-
(oNavigationParameter.navigationType !== NavType.initial && oNavigationParameter.requiresStandardVariant) ||
|
|
148
|
-
(!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
|
|
149
|
-
oController._shouldAutoTriggerSearch(oFilterBarVM)
|
|
150
|
-
) {
|
|
151
|
-
oFilterBarControl.triggerSearch();
|
|
152
|
-
} else {
|
|
153
|
-
bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
|
|
132
|
+
aResults.push(
|
|
133
|
+
oVariantPromise
|
|
134
|
+
.then(function(aVariants) {
|
|
135
|
+
if (aVariants && aVariants.length > 0) {
|
|
136
|
+
if (aVariants[0] === true || aVariants[1] === true) {
|
|
137
|
+
bFilterVariantApplied = true;
|
|
138
|
+
}
|
|
154
139
|
}
|
|
155
|
-
that.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
140
|
+
return that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
|
|
141
|
+
var oDynamicPage = oView.byId("fe::ListReport");
|
|
142
|
+
var bPreventInitialSearch = false;
|
|
143
|
+
var oFilterBarVM = that._getFilterBarVM(oView);
|
|
144
|
+
var oFilterBarControl = oController._getFilterBarControl();
|
|
145
|
+
if (
|
|
146
|
+
(oNavigationParameter.navigationType !== NavType.initial &&
|
|
147
|
+
oNavigationParameter.requiresStandardVariant) ||
|
|
148
|
+
(!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
|
|
149
|
+
oController._shouldAutoTriggerSearch(oFilterBarVM)
|
|
150
|
+
) {
|
|
151
|
+
oFilterBarControl.triggerSearch();
|
|
152
|
+
} else {
|
|
153
|
+
bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
|
|
154
|
+
}
|
|
155
|
+
that._bSearchTriggered = !bPreventInitialSearch;
|
|
156
|
+
oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
|
|
157
|
+
});
|
|
158
|
+
})
|
|
159
|
+
.catch(function() {
|
|
160
|
+
Log.error("Variant ID cannot be applied");
|
|
161
|
+
})
|
|
162
|
+
);
|
|
163
163
|
},
|
|
164
164
|
|
|
165
165
|
handleVariantIdPassedViaURLParams: function(oUrlParams) {
|