diff --git a/eclipse-scout-core/src/table/Table.ts b/eclipse-scout-core/src/table/Table.ts index a36ba357f40..d9cc7ec2d9d 100644 --- a/eclipse-scout-core/src/table/Table.ts +++ b/eclipse-scout-core/src/table/Table.ts @@ -5209,8 +5209,10 @@ export class Table extends Widget implements TableModel, Filterable { createTiles(rows: TableRow[]): Tile[] { return rows.map(row => { let tile = this.createTileForRow(row); - this._adaptTile(tile); - tile.rowId = row.id; + if (tile) { + this._adaptTile(tile); + tile.rowId = row.id; + } return tile; }); } diff --git a/eclipse-scout-core/src/table/TableTileGridMediator.ts b/eclipse-scout-core/src/table/TableTileGridMediator.ts index 9acc9f675ee..300d8048cff 100644 --- a/eclipse-scout-core/src/table/TableTileGridMediator.ts +++ b/eclipse-scout-core/src/table/TableTileGridMediator.ts @@ -190,6 +190,7 @@ export class TableTileGridMediator extends Widget implements TableTileGridMediat } setTiles(tiles: ObjectOrChildModel[]) { + tiles = [...new Set(tiles)].filter(Boolean); // remove duplicates and nulls this.setProperty('tiles', tiles); } @@ -435,7 +436,7 @@ export class TableTileGridMediator extends Widget implements TableTileGridMediat this.table.loadingSupport.renderLoading(true); } - override destroy() { + protected override _destroy() { // destroy tiles manually since owner is the mediator thus the tileGrid can't destroy them this.tiles.forEach(tile => tile.destroy()); this.tileAccordion.destroy(); @@ -528,7 +529,7 @@ export class TableTileGridMediator extends Widget implements TableTileGridMediat if (!this.table.tileMode || $.isEmptyObject(this.tilesMap)) { return; } - this.tiles = this.table.rows.map(row => this.tilesMap[row.id]); + this.tiles = [...new Set(this.table.rows.map(row => this.tilesMap[row.id]))].filter(Boolean); // remove duplicates and nulls this.tileAccordion.setTiles(this.tiles); } diff --git a/eclipse-scout-core/src/table/TileTableHeaderBox.ts b/eclipse-scout-core/src/table/TileTableHeaderBox.ts index da531e4569c..f56041f0591 100644 --- a/eclipse-scout-core/src/table/TileTableHeaderBox.ts +++ b/eclipse-scout-core/src/table/TileTableHeaderBox.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2025 BSI Business Systems Integration AG + * Copyright (c) 2010, 2026 BSI Business Systems Integration AG * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -166,34 +166,34 @@ export class TileTableHeaderBox extends GroupBox implements TileTableHeaderBoxMo } protected _syncSortingGroupingFields() { - let primaryGroupingColumn = arrays.find(this.table.visibleColumns(), column => column.grouped && column.sortIndex === 0); - if (primaryGroupingColumn) { - this.groupByField.setValue(primaryGroupingColumn); - } else { - this.groupByField.setValue(null); + if (!this.isGrouping) { + let primaryGroupingColumn = arrays.find(this.table.visibleColumns(), column => column.grouped && column.sortIndex === 0); + if (primaryGroupingColumn) { + this.groupByField.setValue(primaryGroupingColumn); + } else { + this.groupByField.setValue(null); + } } - let primarySortingColumn = arrays.find(this.table.visibleColumns(), column => column.sortActive && column.sortIndex === 0); - if (primarySortingColumn) { - this.sortByField.setValue(this._findSortByLookupRowForKey({ - column: primarySortingColumn, - asc: primarySortingColumn.sortAscending - })); - } else { - this.sortByField.setValue(null); + if (!this.isSorting) { + let primarySortingColumn = arrays.find(this.table.visibleColumns(), column => column.sortActive && column.sortIndex === 0); + if (primarySortingColumn) { + this.sortByField.setValue(this._findSortByLookupRowForKey({ + column: primarySortingColumn, + asc: primarySortingColumn.sortAscending + })); + } else { + this.sortByField.setValue(null); + } } } protected _onTableGroup(event: TableGroupEvent) { - if (!this.isGrouping) { - this._syncSortingGroupingFields(); - } + this._syncSortingGroupingFields(); } protected _onTableSort(event: TableSortEvent) { - if (!this.isSorting) { - this._syncSortingGroupingFields(); - } + this._syncSortingGroupingFields(); } protected _onTableColumnStructureChanged(event: TableColumnStructureChangedEvent) { diff --git a/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTileTableHeader.java b/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTileTableHeader.java index 76b4e8737b7..a5a327adb87 100644 --- a/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTileTableHeader.java +++ b/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTileTableHeader.java @@ -30,6 +30,7 @@ import org.eclipse.scout.rt.platform.util.CollectionUtility; import org.eclipse.scout.rt.platform.util.ImmutablePair; import org.eclipse.scout.rt.platform.util.ObjectUtility; +import org.eclipse.scout.rt.shared.AbstractIcons; import org.eclipse.scout.rt.shared.data.basic.FontSpec; import org.eclipse.scout.rt.shared.services.lookup.ILookupCall; import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; @@ -308,8 +309,11 @@ protected List>> execCreate for (IColumn col : getTable().getColumns()) { if (col.isVisible() && isColumnTypeAllowedForSorting(col)) { String colLabel = ObjectUtility.nvl(col.getHeaderCell().getText(), col.getHeaderCell().getTooltipText()); - lookupRows.add(new LookupRow<>(new ImmutablePair<>(col, true), colLabel + " ↑")); // U+2191 - lookupRows.add(new LookupRow<>(new ImmutablePair<>(col, false), colLabel + " ↓")); // U+2193 + lookupRows.add(new LookupRow<>(new ImmutablePair<>(col, true), colLabel + " (" + TEXTS.get("ascending") + ")") + .withIconId(AbstractIcons.LongArrowUpBold)); + lookupRows.add(new LookupRow<>(new ImmutablePair<>(col, false), colLabel + " (" + TEXTS.get("descending") + ")") + .withIconId(AbstractIcons.LongArrowDownBold) + ); } } diff --git a/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts.properties b/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts.properties index 75c1e810a8d..cd08aa25f29 100644 --- a/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts.properties +++ b/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts.properties @@ -351,5 +351,7 @@ YearToDateTwoYearsBefore=two years ago Yes=Yes YesButton=Yes and=and +ascending=ascending +descending=descending from=from to=to diff --git a/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_de.properties b/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_de.properties index dfdfbbb1a95..d701473607f 100644 --- a/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_de.properties +++ b/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_de.properties @@ -351,5 +351,7 @@ YearToDateTwoYearsBefore=vor zwei Jahren Yes=Ja YesButton=Ja and=und +ascending=aufsteigend +descending=absteigend from=von to=bis diff --git a/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_fr.properties b/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_fr.properties index e2beb07833d..7cc3a472c39 100644 --- a/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_fr.properties +++ b/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_fr.properties @@ -351,5 +351,7 @@ YearToDateTwoYearsBefore=il y a deux ans Yes=Oui YesButton=Oui and=et +ascending=croissant +descending=décroissant from=de to=à diff --git a/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_it.properties b/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_it.properties index f7d523253a6..89941c227e3 100644 --- a/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_it.properties +++ b/org.eclipse.scout.rt.nls/src/main/resources/org/eclipse/scout/rt/nls/texts/ScoutTexts_it.properties @@ -351,5 +351,7 @@ YearToDateTwoYearsBefore=due anni fa Yes=Sì YesButton=Sì and=e +ascending=crescente +descending=decrescente from=da to=a