@openui5/sap.ui.mdc 1.124.7 → 1.124.9
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/THIRDPARTY.txt +1 -1
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +1 -1
- package/src/sap/ui/mdc/Chart.js +1 -1
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/DefaultTypeMap.js +2 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +13 -13
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +2 -2
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +14 -14
- package/src/sap/ui/mdc/ValueHelp.js +74 -22
- package/src/sap/ui/mdc/ValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +1 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +1 -1
- package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
- package/src/sap/ui/mdc/field/ConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/FieldBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/library.js +2 -2
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
- package/src/sap/ui/mdc/odata/TypeMap.js +2 -1
- package/src/sap/ui/mdc/odata/v4/TypeMap.js +2 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/ColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/DragDropConfig.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/utils/Personalization.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/util/InfoBar.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/util/TypeMap.js +15 -4
- package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
- package/src/sap/ui/mdc/valuehelp/FilterBar.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Popover.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +27 -3
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +44 -18
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +52 -8
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +65 -20
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @param {object} [mSettings] Initial settings for the new element
|
|
27
27
|
* @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element.
|
|
28
28
|
* @extends sap.ui.core.Element
|
|
29
|
-
* @version 1.124.
|
|
29
|
+
* @version 1.124.9
|
|
30
30
|
* @constructor
|
|
31
31
|
* @abstract
|
|
32
32
|
* @public
|
|
@@ -206,8 +206,6 @@ sap.ui.define([
|
|
|
206
206
|
const oContent = oChanges.child;
|
|
207
207
|
if (oChanges.mutation === "remove") {
|
|
208
208
|
this.unbindContentFromContainer(oContent);
|
|
209
|
-
// } else {
|
|
210
|
-
// this.bindContentToContainer(oContent);
|
|
211
209
|
}
|
|
212
210
|
}
|
|
213
211
|
};
|
|
@@ -954,6 +952,32 @@ sap.ui.define([
|
|
|
954
952
|
|
|
955
953
|
};
|
|
956
954
|
|
|
955
|
+
Container.prototype.clone = function(sIdSuffix, aLocalIds) {
|
|
956
|
+
|
|
957
|
+
// detach event handler before cloning to not have it twice on the clone
|
|
958
|
+
// attach it after clone again
|
|
959
|
+
const aContent = this.getContent();
|
|
960
|
+
|
|
961
|
+
for (let i = 0; i < aContent.length; i++) {
|
|
962
|
+
if (aContent[i]._bContentBound) {
|
|
963
|
+
aContent[i]._bRebindContent = true;
|
|
964
|
+
this.unbindContentFromContainer(aContent[i]);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
const oClone = Element.prototype.clone.apply(this, arguments);
|
|
969
|
+
|
|
970
|
+
for (let i = 0; i < aContent.length; i++) { // for Dialog overwrite to only bind shown content
|
|
971
|
+
if (aContent[i]._bRebindContent) {
|
|
972
|
+
this.bindContentToContainer(aContent[i]);
|
|
973
|
+
delete aContent[i]._bRebindContent;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
return oClone;
|
|
978
|
+
|
|
979
|
+
};
|
|
980
|
+
|
|
957
981
|
Container.prototype.exit = function() {
|
|
958
982
|
this._oObserver.disconnect();
|
|
959
983
|
this._oObserver = undefined;
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
* @param {object} [mSettings] Initial settings for the new element
|
|
35
35
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
|
|
36
36
|
* @extends sap.ui.core.Element
|
|
37
|
-
* @version 1.124.
|
|
37
|
+
* @version 1.124.9
|
|
38
38
|
* @constructor
|
|
39
39
|
* @abstract
|
|
40
40
|
* @public
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @param {object} [mSettings] Initial settings for the new control
|
|
21
21
|
* @class Content for the <code>sap.ui.mdc.valuehelp.content.Dialog</code> element.
|
|
22
22
|
* @extends sap.ui.core.Control
|
|
23
|
-
* @version 1.124.
|
|
23
|
+
* @version 1.124.9
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* @param {object} [mSettings] Initial settings for the new element
|
|
45
45
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
|
|
46
46
|
* @extends sap.ui.mdc.valuehelp.base.ListContent
|
|
47
|
-
* @version 1.124.
|
|
47
|
+
* @version 1.124.9
|
|
48
48
|
* @constructor
|
|
49
49
|
* @abstract
|
|
50
50
|
* @public
|
|
@@ -396,29 +396,15 @@ sap.ui.define([
|
|
|
396
396
|
if (oChanges.mutation === "insert") {
|
|
397
397
|
this._updateBasicSearchField();
|
|
398
398
|
this._assignCollectiveSearchSelect();
|
|
399
|
-
|
|
400
|
-
if (oChanges.name !== "_defaultFilterBar" || !this.getFilterBar()) { // DefaultFilterBar only used if no other FilterBar assigned
|
|
401
|
-
oFilterBar.attachSearch(this._handleSearch, this);
|
|
402
|
-
}
|
|
403
|
-
if (oChanges.name === "filterBar") {
|
|
404
|
-
oDefaultFilterBar = this.getAggregation("_defaultFilterBar");
|
|
405
|
-
if (oDefaultFilterBar) {
|
|
406
|
-
oDefaultFilterBar.detachSearch(this._handleSearch, this);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
399
|
} else { // remove case
|
|
410
400
|
const oExistingBasicSearchField = oFilterBar.getBasicSearchField();
|
|
411
401
|
if (oExistingBasicSearchField && oExistingBasicSearchField._bCreatedByValueHelp) {
|
|
412
402
|
oFilterBar.setBasicSearchField(); // remove to reuse on other FilterBar
|
|
413
403
|
}
|
|
414
404
|
|
|
415
|
-
oFilterBar.detachSearch(this._handleSearch, this);
|
|
416
|
-
|
|
417
405
|
if (oChanges.name === "filterBar") {
|
|
418
406
|
oDefaultFilterBar = this.getAggregation("_defaultFilterBar");
|
|
419
|
-
if (oDefaultFilterBar) {
|
|
420
|
-
oDefaultFilterBar.attachSearch(this._handleSearch, this);
|
|
421
|
-
} else {
|
|
407
|
+
if (!oDefaultFilterBar) {
|
|
422
408
|
this._createDefaultFilterBar();
|
|
423
409
|
}
|
|
424
410
|
}
|
|
@@ -564,13 +550,19 @@ sap.ui.define([
|
|
|
564
550
|
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
565
551
|
*/
|
|
566
552
|
FilterableListContent.prototype.onBeforeShow = function(bInitial) {
|
|
553
|
+
const oFilterBar = this.getActiveFilterBar();
|
|
554
|
+
|
|
555
|
+
if (oFilterBar && !oFilterBar._bAttached) {
|
|
556
|
+
oFilterBar.attachSearch(this._handleSearch, this); // event only needed if shown
|
|
557
|
+
oFilterBar._bAttached = true;
|
|
558
|
+
}
|
|
559
|
+
|
|
567
560
|
if (bInitial) {
|
|
568
561
|
this._updateBasicSearchField();
|
|
569
562
|
const oDelegate = this.getValueHelpDelegate();
|
|
570
563
|
return Promise.resolve(oDelegate && oDelegate.getFilterConditions(this.getValueHelpInstance(), this)).then((oConditions) => {
|
|
571
564
|
this._oInitialFilterConditions = oConditions;
|
|
572
565
|
|
|
573
|
-
const oFilterBar = this.getActiveFilterBar();
|
|
574
566
|
if (oFilterBar) { // apply initial conditions to filterbar if existing
|
|
575
567
|
let sSearchPath = "$search";
|
|
576
568
|
/**
|
|
@@ -590,11 +582,23 @@ sap.ui.define([
|
|
|
590
582
|
return StateUtil.applyExternalState(oFilterBar, oStateDiff);
|
|
591
583
|
});
|
|
592
584
|
|
|
585
|
+
oFilterBar.cleanUpAllFilterFieldsInErrorState();
|
|
586
|
+
|
|
593
587
|
return pHandleConditions.then(() => oFilterBar.awaitPendingModification());
|
|
594
588
|
}
|
|
595
589
|
});
|
|
596
590
|
}
|
|
597
|
-
return
|
|
591
|
+
return Promise.resolve();
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
FilterableListContent.prototype.onHide = function() {
|
|
595
|
+
ListContent.prototype.onHide.apply(this, arguments);
|
|
596
|
+
|
|
597
|
+
const oFilterBar = this.getActiveFilterBar();
|
|
598
|
+
if (oFilterBar?._bAttached) {
|
|
599
|
+
oFilterBar.detachSearch(this._handleSearch, this); // if hidden, event not needed
|
|
600
|
+
oFilterBar._bAttached = false;
|
|
601
|
+
}
|
|
598
602
|
};
|
|
599
603
|
|
|
600
604
|
/**
|
|
@@ -673,6 +677,28 @@ sap.ui.define([
|
|
|
673
677
|
});
|
|
674
678
|
};
|
|
675
679
|
|
|
680
|
+
FilterableListContent.prototype.clone = function(sIdSuffix, aLocalIds) {
|
|
681
|
+
|
|
682
|
+
// detach event handler before cloning to not have it twice on the clone
|
|
683
|
+
// attach it after clone again
|
|
684
|
+
const oFilterBar = this.getActiveFilterBar();
|
|
685
|
+
const bAttached = oFilterBar?._bAttached;
|
|
686
|
+
if (bAttached) {
|
|
687
|
+
oFilterBar.detachSearch(this._handleSearch, this);
|
|
688
|
+
oFilterBar._bAttached = false;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
const oClone = ListContent.prototype.clone.apply(this, arguments);
|
|
692
|
+
|
|
693
|
+
if (bAttached) {
|
|
694
|
+
oFilterBar.attachSearch(this._handleSearch, this);
|
|
695
|
+
oFilterBar._bAttached = true;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
return oClone;
|
|
699
|
+
|
|
700
|
+
};
|
|
701
|
+
|
|
676
702
|
function _addSearchConditionToConditionMap(oConditions, sSearchPath, sFilterValue) {
|
|
677
703
|
oConditions[sSearchPath] = sFilterValue ? [Condition.createCondition(OperatorName.Contains, [sFilterValue], undefined, undefined, ConditionValidated.NotValidated)] : [];
|
|
678
704
|
return;
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @param {object} [mSettings] Initial settings for the new element
|
|
22
22
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
|
|
23
23
|
* @extends sap.ui.mdc.valuehelp.base.Content
|
|
24
|
-
* @version 1.124.
|
|
24
|
+
* @version 1.124.9
|
|
25
25
|
* @constructor
|
|
26
26
|
* @abstract
|
|
27
27
|
* @public
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @param {object} [mSettings] Initial settings for the new element
|
|
21
21
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element to provide a value help for boolean fields.
|
|
22
22
|
* @extends sap.ui.mdc.valuehelp.content.FixedList
|
|
23
|
-
* @version 1.124.
|
|
23
|
+
* @version 1.124.9
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @param {object} [mSettings] Initial settings for the new element
|
|
28
28
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element showing a condition panel.
|
|
29
29
|
* @extends sap.ui.mdc.valuehelp.base.Content
|
|
30
|
-
* @version 1.124.
|
|
30
|
+
* @version 1.124.9
|
|
31
31
|
* @constructor
|
|
32
32
|
* @public
|
|
33
33
|
* @since 1.95.0
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @param {object} [mSettings] Initial settings for the new element
|
|
33
33
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element showing a list with fixed values.
|
|
34
34
|
* @extends sap.ui.mdc.valuehelp.base.ListContent
|
|
35
|
-
* @version 1.124.
|
|
35
|
+
* @version 1.124.9
|
|
36
36
|
* @constructor
|
|
37
37
|
* @public
|
|
38
38
|
* @since 1.95.0
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* @param {object} [mSettings] Initial settings for the new element
|
|
39
39
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element using a {@link sap.ui.mdc.Table}.
|
|
40
40
|
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
41
|
-
* @version 1.124.
|
|
41
|
+
* @version 1.124.9
|
|
42
42
|
* @constructor
|
|
43
43
|
* @public
|
|
44
44
|
* @since 1.95.0
|
|
@@ -126,8 +126,7 @@ sap.ui.define([
|
|
|
126
126
|
if (oChanges.name === "table") { // outer table
|
|
127
127
|
const oTable = oChanges.child;
|
|
128
128
|
if (oChanges.mutation === "remove") {
|
|
129
|
-
|
|
130
|
-
this._oTable.detachEvent('selectionChange', this._handleSelectionChange, this);
|
|
129
|
+
_detachTableEvents.call(this, this._oTable);
|
|
131
130
|
this._oTable = null;
|
|
132
131
|
this.resetListBinding();
|
|
133
132
|
} else {
|
|
@@ -148,11 +147,6 @@ sap.ui.define([
|
|
|
148
147
|
}
|
|
149
148
|
}
|
|
150
149
|
});
|
|
151
|
-
|
|
152
|
-
this._oTable.initialized().then(() => {
|
|
153
|
-
this._oTable.attachEvent('_bindingChange', this._handleUpdateFinishedThrottled, this);
|
|
154
|
-
this._oTable.attachEvent('selectionChange', this._handleSelectionChange, this);
|
|
155
|
-
});
|
|
156
150
|
}
|
|
157
151
|
return;
|
|
158
152
|
}
|
|
@@ -329,6 +323,9 @@ sap.ui.define([
|
|
|
329
323
|
return Promise.resolve(FilterableListContent.prototype.onBeforeShow.apply(this, arguments)).then(() => {
|
|
330
324
|
const oTable = this.getTable();
|
|
331
325
|
if (oTable) {
|
|
326
|
+
this._oTable.initialized().then(() => {
|
|
327
|
+
_attachTableEvents.call(this, this._oTable);
|
|
328
|
+
});
|
|
332
329
|
const bTableBound = oTable.isTableBound();
|
|
333
330
|
const bOverlay = bTableBound && oTable._oTable.getShowOverlay();
|
|
334
331
|
if (this._bRebindTable || bOverlay) {
|
|
@@ -345,6 +342,14 @@ sap.ui.define([
|
|
|
345
342
|
});
|
|
346
343
|
};
|
|
347
344
|
|
|
345
|
+
MDCTable.prototype.onHide = function() {
|
|
346
|
+
FilterableListContent.prototype.onHide.apply(this, arguments);
|
|
347
|
+
|
|
348
|
+
if (this._oTable) {
|
|
349
|
+
_detachTableEvents.call(this, this._oTable);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
348
353
|
MDCTable.prototype.getScrollDelegate = function() {
|
|
349
354
|
if (!this.isTypeahead() && this._oScrollContainer) {
|
|
350
355
|
return this._oScrollContainer.getScrollDelegate();
|
|
@@ -375,6 +380,45 @@ sap.ui.define([
|
|
|
375
380
|
|
|
376
381
|
};
|
|
377
382
|
|
|
383
|
+
MDCTable.prototype.clone = function(sIdSuffix, aLocalIds) {
|
|
384
|
+
|
|
385
|
+
// detach event handler before cloning to not have it twice on the clone
|
|
386
|
+
// attach it after clone again
|
|
387
|
+
const bAttached = this._oTable?._bAttached;
|
|
388
|
+
if (bAttached) {
|
|
389
|
+
_detachTableEvents.call(this, this._oTable);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
const oClone = FilterableListContent.prototype.clone.apply(this, arguments);
|
|
393
|
+
|
|
394
|
+
if (bAttached) {
|
|
395
|
+
_attachTableEvents.call(this, this._oTable);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return oClone;
|
|
399
|
+
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
function _attachTableEvents(oTable) {
|
|
403
|
+
|
|
404
|
+
if (!oTable._bAttached) {
|
|
405
|
+
oTable.attachEvent('_bindingChange', this._handleUpdateFinishedThrottled, this);
|
|
406
|
+
oTable.attachEvent('selectionChange', this._handleSelectionChange, this);
|
|
407
|
+
oTable._bAttached = true;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function _detachTableEvents(oTable) {
|
|
413
|
+
|
|
414
|
+
if (oTable._bAttached) {
|
|
415
|
+
oTable.detachEvent('_bindingChange', this._handleUpdateFinishedThrottled, this);
|
|
416
|
+
oTable.detachEvent('selectionChange', this._handleSelectionChange, this);
|
|
417
|
+
oTable._bAttached = false;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
}
|
|
421
|
+
|
|
378
422
|
MDCTable.prototype.exit = function name(params) {
|
|
379
423
|
Common.cleanup(this, [
|
|
380
424
|
"_oContentLayout",
|
|
@@ -51,7 +51,7 @@ sap.ui.define([
|
|
|
51
51
|
* @param {object} [mSettings] Initial settings for the new element
|
|
52
52
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element using a {@link sap.m.Table}.
|
|
53
53
|
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
54
|
-
* @version 1.124.
|
|
54
|
+
* @version 1.124.9
|
|
55
55
|
* @constructor
|
|
56
56
|
* @public
|
|
57
57
|
* @since 1.95.0
|
|
@@ -150,8 +150,12 @@ sap.ui.define([
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
MTable.prototype.onBeforeShow = function(bInitial) {
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
|
|
154
|
+
return Promise.resolve(FilterableListContent.prototype.onBeforeShow.apply(this, arguments)).then(() => {
|
|
155
|
+
const oTable = this._getTable();
|
|
156
|
+
_attachTableEvents.call(this, oTable);
|
|
157
|
+
|
|
158
|
+
if (bInitial) {
|
|
155
159
|
const oListBinding = this.getListBinding();
|
|
156
160
|
const oListBindingInfo = this.getListBindingInfo();
|
|
157
161
|
const bBindingSuspended = oListBinding && oListBinding.isSuspended();
|
|
@@ -160,12 +164,15 @@ sap.ui.define([
|
|
|
160
164
|
if ((bBindingSuspended || bBindingWillBeSuspended) && (!this.isTypeahead() || Device.system.phone)) { // in dialog or phone case do not resume suspended table on opening
|
|
161
165
|
return undefined;
|
|
162
166
|
}
|
|
167
|
+
|
|
168
|
+
const oTable = this._getTable();
|
|
169
|
+
_attachTableEvents.call(this, oTable);
|
|
170
|
+
|
|
163
171
|
return this.applyFilters();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return undefined;
|
|
167
|
-
};
|
|
172
|
+
}
|
|
173
|
+
});
|
|
168
174
|
|
|
175
|
+
};
|
|
169
176
|
|
|
170
177
|
MTable.prototype.applyFilters = function() {
|
|
171
178
|
|
|
@@ -337,6 +344,7 @@ sap.ui.define([
|
|
|
337
344
|
if (oTable.hasStyleClass("sapMComboBoxList")) {
|
|
338
345
|
oTable.removeStyleClass("sapMComboBoxList");
|
|
339
346
|
}
|
|
347
|
+
_detachTableEvents.call(this, oTable);
|
|
340
348
|
}
|
|
341
349
|
|
|
342
350
|
this._iNavigateIndex = -1; // initialize after closing
|
|
@@ -966,10 +974,7 @@ sap.ui.define([
|
|
|
966
974
|
|
|
967
975
|
if (oChanges.mutation === "remove") {
|
|
968
976
|
this._oObserver.unobserve(oTable);
|
|
969
|
-
|
|
970
|
-
this._oTable.detachItemPress(this._handleItemPress, this);
|
|
971
|
-
this._oTable.detachSelectionChange(this._handleSelectionChange, this);
|
|
972
|
-
this._oTable.detachUpdateFinished(this._handleUpdateFinished, this);
|
|
977
|
+
_detachTableEvents.call(this, oTable);
|
|
973
978
|
this._oTable = null;
|
|
974
979
|
this._removePromise("footer");
|
|
975
980
|
this.resetListBinding();
|
|
@@ -977,15 +982,6 @@ sap.ui.define([
|
|
|
977
982
|
this._oTable = oTable;
|
|
978
983
|
this._oTable.addStyleClass("sapMdcValueHelpMTable");
|
|
979
984
|
_adjustTable.call(this);
|
|
980
|
-
this._oTable.attachItemPress(this._handleItemPress, this);
|
|
981
|
-
this._oTable.attachSelectionChange(this._handleSelectionChange, this);
|
|
982
|
-
this._oTable.attachUpdateFinished(this._handleUpdateFinished, this);
|
|
983
|
-
this._oTableDelegate = this._oTableDelegate || {
|
|
984
|
-
onsapprevious: this._handleTableEvent,
|
|
985
|
-
onsapnext: this._handleTableEvent,
|
|
986
|
-
cellClick: this._handleTableEvent
|
|
987
|
-
};
|
|
988
|
-
oTable.addDelegate(this._oTableDelegate, true, this);
|
|
989
985
|
|
|
990
986
|
if (!this.resolveListBinding()) {
|
|
991
987
|
this._oObserver.observe(oChanges.child, { bindings: ["items"] });
|
|
@@ -1080,5 +1076,54 @@ sap.ui.define([
|
|
|
1080
1076
|
_updateSelection.call(this);
|
|
1081
1077
|
};
|
|
1082
1078
|
|
|
1079
|
+
MTable.prototype.clone = function(sIdSuffix, aLocalIds) {
|
|
1080
|
+
|
|
1081
|
+
// detach event handler before cloning to not have it twice on the clone
|
|
1082
|
+
// attach it after clone again
|
|
1083
|
+
const oTable = this._getTable();
|
|
1084
|
+
const bAttached = oTable?._bAttached;
|
|
1085
|
+
if (bAttached) {
|
|
1086
|
+
_detachTableEvents.call(this, oTable);
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
const oClone = FilterableListContent.prototype.clone.apply(this, arguments);
|
|
1090
|
+
|
|
1091
|
+
if (bAttached) {
|
|
1092
|
+
_attachTableEvents.call(this, oTable);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
return oClone;
|
|
1096
|
+
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1099
|
+
function _attachTableEvents(oTable) {
|
|
1100
|
+
|
|
1101
|
+
if (!oTable._bAttached) {
|
|
1102
|
+
oTable.attachItemPress(this._handleItemPress, this);
|
|
1103
|
+
oTable.attachSelectionChange(this._handleSelectionChange, this);
|
|
1104
|
+
oTable.attachUpdateFinished(this._handleUpdateFinished, this);
|
|
1105
|
+
this._oTableDelegate = this._oTableDelegate || {
|
|
1106
|
+
onsapprevious: this._handleTableEvent,
|
|
1107
|
+
onsapnext: this._handleTableEvent,
|
|
1108
|
+
cellClick: this._handleTableEvent
|
|
1109
|
+
};
|
|
1110
|
+
oTable.addDelegate(this._oTableDelegate, true, this);
|
|
1111
|
+
oTable._bAttached = true;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
function _detachTableEvents(oTable) {
|
|
1117
|
+
|
|
1118
|
+
if (oTable._bAttached) {
|
|
1119
|
+
oTable.removeDelegate(this._oTableDelegate);
|
|
1120
|
+
this._oTable.detachItemPress(this._handleItemPress, this);
|
|
1121
|
+
this._oTable.detachSelectionChange(this._handleSelectionChange, this);
|
|
1122
|
+
this._oTable.detachUpdateFinished(this._handleUpdateFinished, this);
|
|
1123
|
+
oTable._bAttached = false;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1083
1128
|
return MTable;
|
|
1084
1129
|
});
|