-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui5-table): adding horizontal column alignment (#9639)
Introduction of a new property horizontalAlign. horizontalAlign is used to configure the horizontal alignment. The idea is to configure the horizontal alignment on the header level of the Table and then automatically adjust the alignment of the cells according to their header cell.
- Loading branch information
1 parent
3330f01
commit 65f75eb
Showing
13 changed files
with
446 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Alignment of the <ui5-table-cell> component. | ||
* | ||
* @public | ||
*/ | ||
enum TableCellHorizontalAlign { | ||
/** | ||
* @public | ||
*/ | ||
Left = "Left", | ||
|
||
/** | ||
* @public | ||
*/ | ||
Start = "Start", | ||
|
||
/** | ||
* @public | ||
*/ | ||
Right = "Right", | ||
|
||
/** | ||
* @public | ||
*/ | ||
End = "End", | ||
|
||
/** | ||
* @public | ||
*/ | ||
Center = "Center", | ||
} | ||
|
||
export default TableCellHorizontalAlign; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<script src="%VITE_BUNDLE_PATH%" type="module"></script> | ||
<title>Table (horizontal alignment)</title> | ||
</head> | ||
|
||
<body style="background-color: var(--sapBackgroundColor)"> | ||
<div class="section"> | ||
<ui5-table id="table" overflow-mode="Popin"> | ||
<ui5-table-header-row slot="headerRow"> | ||
<ui5-table-header-cell id="productCol" width="300px"><span>Product</span></ui5-table-header-cell> | ||
<ui5-table-header-cell id="supplierCol" horizontal-align="Center" width="200px">Supplier</ui5-table-header-cell> | ||
<ui5-table-header-cell id="dimensionsCol" horizontal-align="Right" width="300px">Dimensions</ui5-table-header-cell> | ||
<ui5-table-header-cell id="weightCol" width="100px">Weight</ui5-table-header-cell> | ||
<ui5-table-header-cell id="priceCol" width="220px">Price</ui5-table-header-cell> | ||
</ui5-table-header-row> | ||
<ui5-table-row> | ||
<ui5-table-cell><ui5-label><b>Notebook Basic 15</b><br>HT-1000</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label>Very Best Screens</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label>30 x 18 x 3 cm</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label style="color: #2b7c2b"><b>4.2</b> KG</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label><b>956</b> EUR</ui5-label></ui5-table-cell> | ||
</ui5-table-row> | ||
<ui5-table-row> | ||
<ui5-table-cell><ui5-label><b>Notebook Basic 17</b><br>HT-1001</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label>Smartcards</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label>29 x 17 x 3.1 cm</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label style="color: #2b7c2b"><b>4.5</b> KG</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label><b>1249</b> EUR</ui5-label></ui5-table-cell> | ||
</ui5-table-row> | ||
<ui5-table-row> | ||
<ui5-table-cell><ui5-label><b>Notebook Basic 18</b><br>HT-1002</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label>Technocom</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label>32 x 21 x 4 cm</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label style="color: #2b7c2b"><b>3.7</b> KG</ui5-label></ui5-table-cell> | ||
<ui5-table-cell><ui5-label><b>29</b> EUR</ui5-label></ui5-table-cell> | ||
</ui5-table-row> | ||
</ui5-table> | ||
</div> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.