@openui5/sap.ui.table 1.96.24 → 1.96.26

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.
Files changed (65) hide show
  1. package/package.json +3 -3
  2. package/src/sap/ui/table/.library +2 -2
  3. package/src/sap/ui/table/AnalyticalColumn.js +2 -2
  4. package/src/sap/ui/table/AnalyticalColumnMenu.js +2 -2
  5. package/src/sap/ui/table/AnalyticalColumnMenuRenderer.js +1 -1
  6. package/src/sap/ui/table/AnalyticalTable.js +6 -14
  7. package/src/sap/ui/table/AnalyticalTableRenderer.js +1 -1
  8. package/src/sap/ui/table/Column.js +2 -2
  9. package/src/sap/ui/table/ColumnMenu.js +2 -2
  10. package/src/sap/ui/table/ColumnMenuRenderer.js +1 -1
  11. package/src/sap/ui/table/CreationRow.js +2 -2
  12. package/src/sap/ui/table/CreationRowRenderer.js +1 -1
  13. package/src/sap/ui/table/Row.js +2 -2
  14. package/src/sap/ui/table/RowAction.js +2 -2
  15. package/src/sap/ui/table/RowActionItem.js +2 -2
  16. package/src/sap/ui/table/RowActionRenderer.js +1 -1
  17. package/src/sap/ui/table/RowSettings.js +2 -2
  18. package/src/sap/ui/table/Table.js +45 -82
  19. package/src/sap/ui/table/TablePersoController.js +2 -2
  20. package/src/sap/ui/table/TableRenderer.js +1 -1
  21. package/src/sap/ui/table/TreeTable.js +25 -9
  22. package/src/sap/ui/table/TreeTableRenderer.js +1 -1
  23. package/src/sap/ui/table/designtime/AnalyticalTable.designtime.js +1 -1
  24. package/src/sap/ui/table/designtime/Table.designtime.js +1 -1
  25. package/src/sap/ui/table/designtime/library.designtime.js +1 -1
  26. package/src/sap/ui/table/extensions/Accessibility.js +7 -7
  27. package/src/sap/ui/table/extensions/AccessibilityRender.js +4 -2
  28. package/src/sap/ui/table/extensions/DragAndDrop.js +2 -2
  29. package/src/sap/ui/table/extensions/ExtensionBase.js +2 -2
  30. package/src/sap/ui/table/extensions/Keyboard.js +2 -2
  31. package/src/sap/ui/table/extensions/KeyboardDelegate.js +2 -2
  32. package/src/sap/ui/table/extensions/Pointer.js +2 -2
  33. package/src/sap/ui/table/extensions/Scrolling.js +9 -2
  34. package/src/sap/ui/table/extensions/ScrollingIOS.js +2 -2
  35. package/src/sap/ui/table/extensions/Synchronization.js +2 -2
  36. package/src/sap/ui/table/library.js +11 -11
  37. package/src/sap/ui/table/library.support.js +1 -1
  38. package/src/sap/ui/table/messagebundle_en_US_saprigi.properties +73 -73
  39. package/src/sap/ui/table/messagebundle_sh.properties +2 -2
  40. package/src/sap/ui/table/messagebundle_sr.properties +2 -2
  41. package/src/sap/ui/table/plugins/BindingSelection.js +2 -2
  42. package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +1 -1
  43. package/src/sap/ui/table/plugins/PluginBase.js +2 -2
  44. package/src/sap/ui/table/plugins/SelectionModelSelection.js +10 -18
  45. package/src/sap/ui/table/plugins/SelectionPlugin.js +2 -2
  46. package/src/sap/ui/table/plugins/V4Aggregation.js +2 -2
  47. package/src/sap/ui/table/rowmodes/AutoRowMode.js +3 -3
  48. package/src/sap/ui/table/rowmodes/FixedRowMode.js +3 -3
  49. package/src/sap/ui/table/rowmodes/InteractiveRowMode.js +3 -3
  50. package/src/sap/ui/table/rowmodes/RowMode.js +5 -11
  51. package/src/sap/ui/table/rowmodes/VariableRowMode.js +2 -2
  52. package/src/sap/ui/table/rules/Accessibility.support.js +1 -1
  53. package/src/sap/ui/table/rules/Binding.support.js +1 -1
  54. package/src/sap/ui/table/rules/ColumnTemplate.support.js +1 -1
  55. package/src/sap/ui/table/rules/Plugins.support.js +1 -1
  56. package/src/sap/ui/table/rules/Rows.support.js +1 -1
  57. package/src/sap/ui/table/rules/TableHelper.support.js +1 -1
  58. package/src/sap/ui/table/themes/base/library.source.less +1 -1
  59. package/src/sap/ui/table/themes/sap_hcb/library.source.less +1 -1
  60. package/src/sap/ui/table/utils/TableUtils.js +2 -2
  61. package/src/sap/ui/table/utils/_BindingUtils.js +2 -2
  62. package/src/sap/ui/table/utils/_ColumnUtils.js +2 -2
  63. package/src/sap/ui/table/utils/_GroupingUtils.js +2 -2
  64. package/src/sap/ui/table/utils/_HookUtils.js +2 -2
  65. package/src/sap/ui/table/utils/_MenuUtils.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.table",
3
- "version": "1.96.24",
3
+ "version": "1.96.26",
4
4
  "description": "OpenUI5 UI Library sap.ui.table",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.ui.core": "1.96.24",
18
- "@openui5/sap.ui.unified": "1.96.24"
17
+ "@openui5/sap.ui.core": "1.96.26",
18
+ "@openui5/sap.ui.unified": "1.96.26"
19
19
  }
20
20
  }
@@ -4,9 +4,9 @@
4
4
  <name>sap.ui.table</name>
5
5
  <vendor>SAP SE</vendor>
6
6
  <copyright>OpenUI5
7
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
7
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.96.24</version>
9
+ <version>1.96.26</version>
10
10
 
11
11
  <documentation>Table-like controls, mainly for desktop scenarios.</documentation>
12
12
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  * @extends sap.ui.table.Column
47
47
  *
48
48
  * @author SAP SE
49
- * @version 1.96.24
49
+ * @version 1.96.26
50
50
  *
51
51
  * @constructor
52
52
  * @public
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -23,7 +23,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './library', "sap/
23
23
  * @extends sap.ui.table.ColumnMenu
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.96.24
26
+ * @version 1.96.26
27
27
  *
28
28
  * @constructor
29
29
  * @public
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  * @see http://scn.sap.com/docs/DOC-44986
61
61
  *
62
62
  * @extends sap.ui.table.Table
63
- * @version 1.96.24
63
+ * @version 1.96.26
64
64
  *
65
65
  * @constructor
66
66
  * @public
@@ -298,19 +298,11 @@ sap.ui.define([
298
298
  return oModel;
299
299
  };
300
300
 
301
- /**
302
- * handler for change events of the binding
303
- * @param {sap.ui.base.Event} oEvent change event
304
- * @private
305
- */
306
- AnalyticalTable.prototype._onBindingChange = function(oEvent) {
307
- Table.prototype._onBindingChange.apply(this, arguments);
308
- // the column menus have to be invalidated when the amount
309
- // of data changes in the Table; this happens on normal changes
310
- // of the Table as well as when filtering
311
- var sReason = typeof (oEvent) === "object" ? oEvent.getParameter("reason") : oEvent;
301
+ AnalyticalTable.prototype.updateRows = function(sReason) {
302
+ Table.prototype.updateRows.apply(this, arguments);
303
+
312
304
  if (sReason !== "sort") {
313
- this._invalidateColumnMenus();
305
+ this._invalidateColumnMenus(); // TODO: Is this needed?
314
306
  }
315
307
  };
316
308
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -70,7 +70,7 @@ sap.ui.define([
70
70
  * @class
71
71
  * The column allows you to define column specific properties that will be applied when rendering the table.
72
72
  * @extends sap.ui.core.Element
73
- * @version 1.96.24
73
+ * @version 1.96.26
74
74
  *
75
75
  * @constructor
76
76
  * @public
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @class
41
41
  * The column menu provides all common actions that can be performed on a column.
42
42
  * @extends sap.ui.unified.Menu
43
- * @version 1.96.24
43
+ * @version 1.96.26
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * <code>sap.ui.commons</code> library.
33
33
  * @extends sap.ui.core.Control
34
34
  * @author SAP SE
35
- * @version 1.96.24
35
+ * @version 1.96.26
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -135,7 +135,7 @@ sap.ui.define([
135
135
  * @class
136
136
  * The row.
137
137
  * @extends sap.ui.core.Element
138
- * @version 1.96.24
138
+ * @version 1.96.26
139
139
  *
140
140
  * @constructor
141
141
  * @public
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * If more action items are available as the available space allows to display an overflow mechanism is provided.
36
36
  * This control must only be used in the context of the <code>sap.ui.table.Table</code> control to define row actions.
37
37
  * @extends sap.ui.core.Control
38
- * @version 1.96.24
38
+ * @version 1.96.26
39
39
  *
40
40
  * @constructor
41
41
  * @public
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.core.Element
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.96.24
27
+ * @version 1.96.26
28
28
  * @since 1.45
29
29
  *
30
30
  * @constructor
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * The <code>RowSettings</code> control allows you to configure a row.
25
25
  * You can only use this control in the context of the <code>sap.ui.table.Table</code> control to define row settings.
26
26
  * @extends sap.ui.core.Element
27
- * @version 1.96.24
27
+ * @version 1.96.26
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -94,7 +94,7 @@ sap.ui.define([
94
94
  * the data model and binding being used.
95
95
  * </p>
96
96
  * @extends sap.ui.core.Control
97
- * @version 1.96.24
97
+ * @version 1.96.26
98
98
  *
99
99
  * @constructor
100
100
  * @public
@@ -1430,6 +1430,7 @@ sap.ui.define([
1430
1430
  }
1431
1431
 
1432
1432
  this._updateTableSizes(TableUtils.RowsUpdateReason.Render, true);
1433
+ this._adjustFirstVisibleRowToTotalRowCount(); // The number of rendered rows might have changed.
1433
1434
  TableUtils.registerResizeHandler(this, "Table", this._onTableResize.bind(this));
1434
1435
 
1435
1436
  this._bFirstRendering = false;
@@ -2086,13 +2087,7 @@ sap.ui.define([
2086
2087
  * @param {sap.ui.base.Event} oEvent change event
2087
2088
  * @private
2088
2089
  */
2089
- Table.prototype._onBindingChange = function(oEvent) {
2090
- var sReason = oEvent.getParameter("reason");
2091
-
2092
- if (sReason === ChangeReason.Sort || sReason === ChangeReason.Filter) {
2093
- this.setFirstVisibleRow(0);
2094
- }
2095
- };
2090
+ Table.prototype._onBindingChange = function(oEvent) {};
2096
2091
 
2097
2092
  /*
2098
2093
  * @see JSDoc generated by SAPUI5 control API generator
@@ -2349,101 +2344,53 @@ sap.ui.define([
2349
2344
  * @returns {Object[]} Array of row contexts returned from the binding.
2350
2345
  * @private
2351
2346
  */
2352
- Table.prototype._getRowContexts = function(iRequestLength, bSuppressAdjustToBindingLength, bSecondCall) {
2347
+ Table.prototype._getRowContexts = function(iRequestLength) {
2353
2348
  var oBinding = this.getBinding();
2354
- var iRowCount = this.getRows().length;
2349
+ var mRowCounts = this._getRowCounts();
2355
2350
  var iThreshold = this.getThreshold();
2356
2351
 
2357
- iRequestLength = iRequestLength == null ? iRowCount : iRequestLength;
2352
+ iRequestLength = iRequestLength == null ? mRowCounts.count : iRequestLength;
2358
2353
 
2359
- // If the threshold is not explicitly disabled by setting it to 0, the default threshold should be the number of rows.
2360
- iThreshold = iThreshold > 0 ? Math.max(iRequestLength, iThreshold) : 0;
2354
+ // If the threshold is not explicitly disabled by setting it to 0, the threshold should be at least the number of scrollable rows.
2355
+ if (iThreshold !== 0) {
2356
+ iThreshold = Math.max(iRequestLength - mRowCounts.fixedTop - mRowCounts.fixedBottom, iThreshold);
2357
+ }
2361
2358
 
2362
- iRequestLength = Math.max(iRequestLength, this._getRowMode().getMinRequestLength());
2359
+ iRequestLength = Math.max(iRequestLength, this._getRowMode().getMinRequestLength(), 0);
2363
2360
 
2364
- if (!oBinding || iRequestLength <= 0) {
2365
- // Without binding there are no contexts to be retrieved.
2361
+ if (!oBinding || iRequestLength === 0) {
2366
2362
  return [];
2367
2363
  }
2368
2364
 
2369
- bSuppressAdjustToBindingLength = bSuppressAdjustToBindingLength === true;
2370
- bSecondCall = bSecondCall === true;
2365
+ // Data can be requested with a single getContexts call if the fixed and the scrollable rows overlap.
2366
+ // Because of the AnalyticalTable, the fixed bottom rows can only be requested separately.
2371
2367
 
2372
2368
  var iFirstRenderedRowIndex = this._getFirstRenderedRowIndex();
2373
- var mRowCounts = this._getRowCounts();
2374
2369
  var aContexts = [];
2375
- var aTmpContexts;
2376
-
2377
- // because of the analytical table the fixed bottom row must always be requested separately as it is the grand
2378
- // total row for the table.
2379
- var iLength = iRequestLength - mRowCounts.fixedBottom;
2380
- var iMergeOffsetScrollRows = 0;
2381
- var iMergeOffsetBottomRow = iLength;
2382
-
2383
- // data can be requested with a single getContexts call if the fixed rows and the scrollable rows overlap.
2384
- var iStartIndex = iFirstRenderedRowIndex;
2385
-
2386
- var fnMergeArrays = function(aTarget, aSource, iStartIndex) {
2387
- for (var i = 0; i < aSource.length; i++) {
2388
- aTarget[iStartIndex + i] = aSource[i];
2389
- }
2390
- };
2391
2370
 
2392
2371
  if (mRowCounts.fixedTop > 0 && iFirstRenderedRowIndex > 0) {
2393
- // since there is a gap between first visible row and fixed rows it must be requested separately
2394
- // the first visible row always starts counting with 0 in the scroll part of the table no matter
2395
- // how many fixed rows there are.
2396
- iStartIndex = iFirstRenderedRowIndex + mRowCounts.fixedTop;
2397
- // length must be reduced by number of fixed rows since they were just requested separately
2398
- iLength -= mRowCounts.fixedTop;
2399
- iMergeOffsetScrollRows = mRowCounts.fixedTop;
2400
- // retrieve fixed rows separately
2401
- aTmpContexts = this._getFixedRowContexts();
2402
- aContexts = aContexts.concat(aTmpContexts);
2403
- }
2404
-
2405
- // request scroll part contexts but may include fixed rows depending on scroll and length settings
2406
- // if this is done before requesting fixed bottom rows, it saves some performance for the analytical table
2407
- // since the tree gets only build once (as result of getContexts call). If first the fixed bottom row would
2408
- // be requested the analytical binding would build the tree twice.
2409
- aTmpContexts = this._getContexts(iStartIndex, iLength, iThreshold);
2410
-
2411
- if (!bSuppressAdjustToBindingLength) {
2412
- this._adjustToTotalRowCount();
2372
+ // If there is a gap between the first visible row and fixed top rows, the fixed top rows need to be requested separately.
2373
+ // The first visible row always starts at index 0 in the scrollable part, no matter how many fixed top rows there are.
2374
+ mergeContextArrays(aContexts, this._getFixedRowContexts(), 0);
2375
+ mergeContextArrays(aContexts, this._getContexts(iFirstRenderedRowIndex + mRowCounts.fixedTop, iRequestLength - mRowCounts.fixedBottom - mRowCounts.fixedTop, iThreshold), mRowCounts.fixedTop);
2376
+ } else {
2377
+ mergeContextArrays(aContexts, this._getContexts(iFirstRenderedRowIndex, iRequestLength - mRowCounts.fixedBottom, iThreshold), 0);
2413
2378
  }
2414
2379
 
2415
- var iTotalRowCount = this._getTotalRowCount();
2416
-
2417
- // get the binding length after getContext call to make sure that for TreeBindings the client tree was correctly rebuilt
2418
- // this step can be moved to an earlier point when the TreeBindingAdapters all implement tree invalidation in case of getLength calls
2419
- fnMergeArrays(aContexts, aTmpContexts, iMergeOffsetScrollRows);
2420
-
2421
- // request binding length after getContexts call to make sure that in case of tree binding and analytical binding
2422
- // the tree gets only built once (by getContexts call).
2423
- iMergeOffsetBottomRow = Math.min(iMergeOffsetBottomRow, Math.max(iTotalRowCount - mRowCounts.fixedBottom, 0));
2424
2380
  if (mRowCounts.fixedBottom > 0) {
2425
- // retrieve fixed bottom rows separately
2426
- // instead of just concatenating them to the existing contexts it must be made sure that they are put
2427
- // to the correct row index otherwise they would flip into the scroll area in case data gets requested for
2428
- // the scroll part.
2429
- aTmpContexts = this._getFixedBottomRowContexts();
2430
- fnMergeArrays(aContexts, aTmpContexts, iMergeOffsetBottomRow);
2431
- }
2432
-
2433
- // If the Binding#getContexts call triggers recalculation of the binding length, the first visible row index needs to be corrected and a new
2434
- // context range needs to be requested.
2435
-
2436
- var iMaxRowIndex = this._getMaxFirstRenderedRowIndex();
2437
- if (iMaxRowIndex < iFirstRenderedRowIndex && this._bContextsAvailable && !bSecondCall) {
2438
- this._setFirstVisibleRowIndex(this.getFirstVisibleRow(), {
2439
- onlySetProperty: true
2440
- });
2441
- aContexts = this._getRowContexts(iRequestLength, bSuppressAdjustToBindingLength, true);
2381
+ mergeContextArrays(aContexts, this._getFixedBottomRowContexts(),
2382
+ Math.min(mRowCounts.fixedTop + mRowCounts.scrollable, Math.max(this._getTotalRowCount() - mRowCounts.fixedBottom, 0)));
2442
2383
  }
2443
2384
 
2444
2385
  return aContexts;
2445
2386
  };
2446
2387
 
2388
+ function mergeContextArrays(aTarget, aSource, iStartIndex) {
2389
+ for (var i = 0; i < aSource.length; i++) {
2390
+ aTarget[iStartIndex + i] = aSource[i];
2391
+ }
2392
+ }
2393
+
2447
2394
  /**
2448
2395
  * Updates the UI according to the current total row count.
2449
2396
  *
@@ -2455,10 +2402,20 @@ sap.ui.define([
2455
2402
  if (this._iBindingLength !== iTotalRowCount) {
2456
2403
  this._iBindingLength = iTotalRowCount;
2457
2404
  this._updateFixedBottomRows();
2405
+ this._adjustFirstVisibleRowToTotalRowCount();
2458
2406
  TableUtils.Hook.call(this, Hook.TotalRowCountChanged);
2459
2407
  }
2460
2408
  };
2461
2409
 
2410
+ Table.prototype._adjustFirstVisibleRowToTotalRowCount = function() {
2411
+ var iCurrentIndex = this.getFirstVisibleRow();
2412
+ var iMaxIndex = this._getMaxFirstVisibleRowIndex();
2413
+
2414
+ if (iMaxIndex < iCurrentIndex && this._bContextsAvailable) {
2415
+ this._setFirstVisibleRowIndex(iMaxIndex, {onlySetProperty: true});
2416
+ }
2417
+ };
2418
+
2462
2419
  /**
2463
2420
  * Notifies about a binding refresh - called internally by the <code>ManagedObject</code> when the binding fires a "refresh" event.
2464
2421
  * Only relevant for server-side bindings. The table is expected to call <code>Binding#getContexts</code>, which triggers a data request. The
@@ -2504,6 +2461,12 @@ sap.ui.define([
2504
2461
  }
2505
2462
 
2506
2463
  this._bContextsAvailable = true;
2464
+
2465
+ if (sReason === ChangeReason.Sort || sReason === ChangeReason.Filter) {
2466
+ this.setFirstVisibleRow(0);
2467
+ }
2468
+
2469
+ this._adjustToTotalRowCount();
2507
2470
  triggerRowsUpdate(this, sReason);
2508
2471
  };
2509
2472
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extends sap.ui.base.ManagedObject
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.96.24
33
+ * @version 1.96.26
34
34
  * @since 1.21.1
35
35
  *
36
36
  * @constructor
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @class
41
41
  * The TreeTable control provides a comprehensive set of features to display hierarchical data.
42
42
  * @extends sap.ui.table.Table
43
- * @version 1.96.24
43
+ * @version 1.96.26
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -376,17 +376,33 @@ sap.ui.define([
376
376
  }
377
377
  };
378
378
 
379
- TreeTable.prototype._getRowContexts = function() {
380
- var iOldTotalRowCount = this._getTotalRowCount();
381
- var aRowContexts = Table.prototype._getRowContexts.apply(this, arguments);
382
- var iNewTotalRowCount = this._getTotalRowCount();
379
+ TreeTable.prototype._getRowContexts = function(iRequestLength) {
380
+ return getRowContexts(this, iRequestLength);
381
+ };
382
+
383
+ function getRowContexts(oTable, iRequestLength, bSecondCall) {
384
+ var iOldTotalRowCount = oTable._getTotalRowCount();
385
+ var aRowContexts = Table.prototype._getRowContexts.call(oTable, iRequestLength);
386
+
387
+ if (bSecondCall === true) {
388
+ return aRowContexts;
389
+ }
383
390
 
384
- if (TableUtils.isVariableRowHeightEnabled(this) && iOldTotalRowCount !== iNewTotalRowCount) {
385
- return Table.prototype._getRowContexts.apply(this, arguments);
391
+ var iNewTotalRowCount = oTable._getTotalRowCount();
392
+ var iFirstVisibleRow = oTable._getFirstRenderedRowIndex();
393
+ var iMaxRowIndex = oTable._getMaxFirstRenderedRowIndex();
394
+
395
+ oTable._adjustToTotalRowCount();
396
+
397
+ if (iMaxRowIndex < iFirstVisibleRow && oTable._bContextsAvailable) {
398
+ // Get the contexts again, this time with the maximum possible value for the first visible row.
399
+ aRowContexts = getRowContexts(oTable, iRequestLength, true);
400
+ } else if (iOldTotalRowCount !== iNewTotalRowCount) {
401
+ aRowContexts = getRowContexts(oTable, iRequestLength, true);
386
402
  }
387
403
 
388
404
  return aRowContexts;
389
- };
405
+ }
390
406
 
391
407
  TreeTable.prototype._onGroupHeaderChanged = function(iRowIndex, bExpanded) {
392
408
  this.fireToggleOpenState({
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -287,9 +287,9 @@ sap.ui.define([
287
287
  bIsRowChanged = oExtension._iLastRowNumber != iRowNumber || (oExtension._iLastRowNumber == iRowNumber && oExtension._iLastColumnNumber == iColumnNumber);
288
288
  bIsColChanged = oExtension._iLastColumnNumber != iColumnNumber;
289
289
  bIsInitial = oExtension._iLastRowNumber == null && oExtension._iLastColumnNumber == null;
290
- oTable.$("rownumberofrows").text(bIsRowChanged && iRowNumber > 0 ? TableUtils.getResourceText("TBL_ROW_ROWCOUNT", [iRowNumber, mGridSize.rowCount]) : " ");
291
- oTable.$("colnumberofcols").text(bIsColChanged ? TableUtils.getResourceText("TBL_COL_COLCOUNT", [iColumnNumber, mGridSize.columnCount]) : " ");
292
- oTable.$("ariacount").text(bIsInitial ? TableUtils.getResourceText("TBL_DATA_ROWS_COLS", [mGridSize.rowCount, mGridSize.columnCount]) : " ");
290
+ oTable.$("rownumberofrows").text(bIsRowChanged && iRowNumber > 0 ? TableUtils.getResourceText("TBL_ROW_ROWCOUNT", [iRowNumber, mGridSize.rowCount]) : ".");
291
+ oTable.$("colnumberofcols").text(bIsColChanged ? TableUtils.getResourceText("TBL_COL_COLCOUNT", [iColumnNumber, mGridSize.columnCount]) : ".");
292
+ oTable.$("ariacount").text(bIsInitial ? TableUtils.getResourceText("TBL_DATA_ROWS_COLS", [mGridSize.rowCount, mGridSize.columnCount]) : ".");
293
293
 
294
294
  oExtension._iLastRowNumber = iRowNumber;
295
295
  oExtension._iLastColumnNumber = iColumnNumber;
@@ -336,7 +336,7 @@ sap.ui.define([
336
336
  ExtensionHelper.storeDefaultsBeforeCellModifications(oExtension, $Cell, aDefaultLabels, aDefaultDescriptions);
337
337
  var oCountChangeInfo = ExtensionHelper.updateRowColCount(oExtension);
338
338
  var oTable = oExtension.getTable();
339
- oTable.$("cellacc").text(sText || " "); //set the custom text to the prepared hidden element
339
+ oTable.$("cellacc").text(sText || "."); //set the custom text to the prepared hidden element
340
340
 
341
341
  if (fAdapt) { //Allow to adapt the labels / descriptions based on the changed row / column count
342
342
  fAdapt(aLabels, aDescriptions, oCountChangeInfo.rowChange, oCountChangeInfo.colChange, oCountChangeInfo.initial);
@@ -437,7 +437,7 @@ sap.ui.define([
437
437
  }
438
438
  }
439
439
 
440
- var sText = oInfo ? oInfo.description : " ";
440
+ var sText = oInfo ? oInfo.description : ".";
441
441
  if (bIsTreeColumnCell && !bHidden) {
442
442
  var oAttributes = ExtensionHelper.getAriaAttributesFor(this, AccExtension.ELEMENTTYPES.TREEICON, {row: oTableInstances.row});
443
443
  if (oAttributes && oAttributes["aria-label"]) {
@@ -902,7 +902,7 @@ sap.ui.define([
902
902
  * @class Extension for sap.ui.table.Table which handles ACC related things.
903
903
  * @extends sap.ui.table.extensions.ExtensionBase
904
904
  * @author SAP SE
905
- * @version 1.96.24
905
+ * @version 1.96.26
906
906
  * @constructor
907
907
  * @private
908
908
  * @alias sap.ui.table.extensions.Accessibility