11import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js" ;
2- import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js" ;
2+ import {
3+ customElement , slot , property , eventStrict , i18n ,
4+ } from "@ui5/webcomponents-base/dist/decorators.js" ;
35import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js" ;
4- import slot from "@ui5/webcomponents-base/dist/decorators/slot.js" ;
5- import property from "@ui5/webcomponents-base/dist/decorators/property.js" ;
6- import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js" ;
7- import { getScopedVarName } from "@ui5/webcomponents-base/dist/CustomElementsScope.js" ;
8- import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js" ;
9- import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js" ;
10- import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js" ;
11- import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js" ;
12- import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js" ;
13- import type { MoveEventDetail } from "@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.js" ;
146import TableTemplate from "./generated/templates/TableTemplate.lit.js" ;
157import TableStyles from "./generated/themes/Table.css.js" ;
16- import TableRow from "./TableRow.js" ;
178import TableHeaderRow from "./TableHeaderRow.js" ;
18- import type TableHeaderCell from "./TableHeaderCell.js" ;
9+ import TableRow from "./TableRow.js" ;
10+ import TableCell from "./TableCell.js" ;
1911import TableExtension from "./TableExtension.js" ;
20- import type TableSelection from "./TableSelection.js" ;
21- import TableOverflowMode from "./types/TableOverflowMode.js" ;
2212import TableNavigation from "./TableNavigation.js" ;
13+ import TableOverflowMode from "./types/TableOverflowMode.js" ;
14+ import TableDragAndDrop from "./TableDragAndDrop.js" ;
2315import DropIndicator from "./DropIndicator.js" ;
24- import {
25- TABLE_NO_DATA ,
26- } from "./generated/i18n/i18n-defaults.js" ;
2716import BusyIndicator from "./BusyIndicator.js" ;
28- import TableCell from "./TableCell .js" ;
17+ import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler .js" ;
2918import { findVerticalScrollContainer , scrollElementIntoView , isFeature } from "./TableUtils.js" ;
30- import TableDragAndDrop from "./TableDragAndDrop.js" ;
19+ import { getScopedVarName } from "@ui5/webcomponents-base/dist/CustomElementsScope.js" ;
20+ import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js" ;
21+ import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js" ;
22+ import type { MoveEventDetail } from "@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.js" ;
23+ import type TableHeaderCell from "./TableHeaderCell.js" ;
24+ import type TableSelection from "./TableSelection.js" ;
3125import type TableRowActionBase from "./TableRowActionBase.js" ;
3226import type TableVirtualizer from "./TableVirtualizer.js" ;
27+ import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js" ;
28+ import {
29+ TABLE_NO_DATA ,
30+ } from "./generated/i18n/i18n-defaults.js" ;
3331
3432/**
3533 * Interface for components that can be slotted inside the `features` slot of the `ui5-table`.
@@ -70,6 +68,7 @@ interface ITableGrowing extends ITableFeature {
7068
7169/**
7270 * Fired when an interactive row is clicked.
71+ *
7372 * @param {TableRow } row The clicked row instance
7473 * @public
7574 */
@@ -81,6 +80,7 @@ type TableMoveEventDetail = MoveEventDetail;
8180
8281/**
8382 * Fired when a row action is clicked.
83+ *
8484 * @param {TableRowActionBase } action The row action instance
8585 * @param {TableRow } row The row instance
8686 * @public
@@ -192,7 +192,7 @@ type TableRowActionClickEventDetail = {
192192 * @param {TableRow } row The row instance
193193 * @public
194194 */
195- @event ( "row-click" , {
195+ @eventStrict ( "row-click" , {
196196 bubbles : false ,
197197} )
198198
@@ -209,7 +209,7 @@ type TableRowActionClickEventDetail = {
209209 * @param {object } destination The destination object
210210 * @public
211211 */
212- @event ( "move-over" , {
212+ @eventStrict ( "move-over" , {
213213 cancelable : true ,
214214 bubbles : true ,
215215} )
@@ -229,7 +229,7 @@ type TableRowActionClickEventDetail = {
229229 * @param {object } destination The destination object
230230 * @public
231231 */
232- @event ( "move" , {
232+ @eventStrict ( "move" , {
233233 bubbles : true ,
234234} )
235235
@@ -241,7 +241,7 @@ type TableRowActionClickEventDetail = {
241241 * @since 2.6.0
242242 * @public
243243 */
244- @event ( "row-action-click" , {
244+ @eventStrict ( "row-action-click" , {
245245 bubbles : false ,
246246} )
247247
@@ -289,6 +289,7 @@ class Table extends UI5Element {
289289
290290 /**
291291 * Defines the features of the component.
292+ *
292293 * @public
293294 */
294295 @slot ( { type : HTMLElement , individualSlots : true } )
@@ -348,6 +349,7 @@ class Table extends UI5Element {
348349
349350 /**
350351 * Defines the delay in milliseconds, after which the loading indicator will show up for this component.
352+ *
351353 * @default 1000
352354 * @public
353355 */
@@ -386,13 +388,12 @@ class Table extends UI5Element {
386388 _onResizeBound : ResizeObserverCallback ;
387389 _tableNavigation ?: TableNavigation ;
388390 _tableDragAndDrop ?: TableDragAndDrop ;
389- _poppedIn : Array < { col : TableHeaderCell , width : float } > ;
390- _containerWidth : number ;
391+ _poppedIn : Array < { col : TableHeaderCell , width : float } > = [ ] ;
392+ _containerWidth = 0 ;
393+ _rowsLength = 0 ;
391394
392395 constructor ( ) {
393396 super ( ) ;
394- this . _poppedIn = [ ] ;
395- this . _containerWidth = 0 ;
396397 this . _onResizeBound = this . _onResize . bind ( this ) ;
397398 this . _onEventBound = this . _onEvent . bind ( this ) ;
398399 }
@@ -420,6 +421,10 @@ class Table extends UI5Element {
420421 this . _renderNavigated = this . rows . some ( row => row . navigated ) ;
421422 if ( this . headerRow [ 0 ] ) {
422423 this . headerRow [ 0 ] . _rowActionCount = this . rowActionCount ;
424+ if ( this . _getSelection ( ) ?. isMultiSelect ( ) && this . _rowsLength !== this . rows . length ) {
425+ this . _rowsLength = this . rows . length ;
426+ this . headerRow [ 0 ] . _invalidate ++ ;
427+ }
423428 }
424429 this . rows . forEach ( row => {
425430 row . _renderNavigated = this . _renderNavigated ;
0 commit comments