|
33 | 33 | height: 100%;
|
34 | 34 | }
|
35 | 35 |
|
36 |
| - /* All rows - height */ |
37 |
| - #tbl ui5-table-row::part(row) { |
38 |
| - height: 4rem; |
39 |
| - } |
40 |
| - /* One row - higher than the rest */ |
41 |
| - #tbl ui5-table-row#row3::part(row) { |
42 |
| - height: 6rem; |
43 |
| - } |
44 |
| - |
45 |
| - /* All columns - center both vertically and horizontally */ |
46 |
| - #tbl ui5-table-column::part(column) { |
47 |
| - vertical-align: middle; |
48 |
| - text-align: center; |
49 |
| - } |
50 |
| - |
51 |
| - /* All cells - center both vertically and horizontally */ |
52 |
| - #tbl ui5-table-cell::part(cell) { |
53 |
| - vertical-align: middle; |
54 |
| - text-align: center; |
55 |
| - } |
56 |
| - |
57 |
| - /* Title column & cells - left aligned */ |
58 |
| - #tbl ui5-table-cell.title-cell::part(cell), |
59 |
| - #tbl ui5-table-column.title-column::part(column) { |
60 |
| - text-align: left; |
61 |
| - } |
62 |
| - |
63 |
| - /* Price column & cells - right aligned with some padding */ |
64 |
| - #tbl ui5-table-cell.price-cell::part(cell), |
65 |
| - #tbl ui5-table-column.price-column::part(column) { |
66 |
| - text-align: right; |
67 |
| - padding-right: 0.75rem; |
68 |
| - } |
| 36 | + /* All rows - height */ |
| 37 | + #tbl ui5-table-row::part(row) { |
| 38 | + height: 4rem; |
| 39 | + } |
| 40 | + /* One row - higher than the rest */ |
| 41 | + #tbl ui5-table-row#row3::part(row) { |
| 42 | + height: 6rem; |
| 43 | + } |
| 44 | + |
| 45 | + /* All columns - center both vertically and horizontally */ |
| 46 | + #tbl ui5-table-column::part(column) { |
| 47 | + vertical-align: middle; |
| 48 | + text-align: center; |
| 49 | + } |
| 50 | + |
| 51 | + /* All cells - center both vertically and horizontally */ |
| 52 | + #tbl ui5-table-cell::part(cell) { |
| 53 | + vertical-align: middle; |
| 54 | + text-align: center; |
| 55 | + } |
| 56 | + |
| 57 | + /* Title column & cells - left aligned */ |
| 58 | + #tbl ui5-table-cell.title-cell::part(cell), |
| 59 | + #tbl ui5-table-column.title-column::part(column) { |
| 60 | + text-align: left; |
| 61 | + } |
| 62 | + |
| 63 | + /* Price column & cells - right aligned with some padding */ |
| 64 | + #tbl ui5-table-cell.price-cell::part(cell), |
| 65 | + #tbl ui5-table-column.price-column::part(column) { |
| 66 | + text-align: right; |
| 67 | + padding-right: 0.75rem; |
| 68 | + } |
69 | 69 | </style>
|
70 | 70 |
|
71 | 71 | <body style="background-color: var(--sapBackgroundColor);">
|
|
103 | 103 | <ui5-table-cell class="price-cell">956 EUR</ui5-table-cell>
|
104 | 104 | </ui5-table-row>
|
105 | 105 |
|
106 |
| - <ui5-table-row id="row2"> |
107 |
| - <ui5-table-cell class="title-cell">Notebook Basic 17</ui5-table-cell> |
108 |
| - <ui5-table-cell>Very Best Screens</ui5-table-cell> |
109 |
| - <ui5-table-cell>40 x 18 x 3 cm</ui5-table-cell> |
110 |
| - <ui5-table-cell>4.6 KG</ui5-table-cell> |
111 |
| - <ui5-table-cell class="price-cell">1956 EUR</ui5-table-cell> |
112 |
| - </ui5-table-row> |
113 |
| - |
114 |
| - <ui5-table-row id="row3"> |
115 |
| - <ui5-table-cell class="title-cell">Notebook Basic 19</ui5-table-cell> |
116 |
| - <ui5-table-cell>Very Best Screens</ui5-table-cell> |
117 |
| - <ui5-table-cell>50 x 18 x 3 cm</ui5-table-cell> |
118 |
| - <ui5-table-cell>4.9 KG</ui5-table-cell> |
119 |
| - <ui5-table-cell class="price-cell">2956 EUR</ui5-table-cell> |
120 |
| - </ui5-table-row> |
| 106 | + <ui5-table-row id="row2"> |
| 107 | + <ui5-table-cell class="title-cell">Notebook Basic 17</ui5-table-cell> |
| 108 | + <ui5-table-cell>Very Best Screens</ui5-table-cell> |
| 109 | + <ui5-table-cell>40 x 18 x 3 cm</ui5-table-cell> |
| 110 | + <ui5-table-cell>4.6 KG</ui5-table-cell> |
| 111 | + <ui5-table-cell class="price-cell">1956 EUR</ui5-table-cell> |
| 112 | + </ui5-table-row> |
| 113 | + |
| 114 | + <ui5-table-row id="row3"> |
| 115 | + <ui5-table-cell class="title-cell">Notebook Basic 19</ui5-table-cell> |
| 116 | + <ui5-table-cell>Very Best Screens</ui5-table-cell> |
| 117 | + <ui5-table-cell>50 x 18 x 3 cm</ui5-table-cell> |
| 118 | + <ui5-table-cell>4.9 KG</ui5-table-cell> |
| 119 | + <ui5-table-cell class="price-cell">2956 EUR</ui5-table-cell> |
| 120 | + </ui5-table-row> |
121 | 121 |
|
122 | 122 | </ui5-table>
|
123 | 123 |
|
| 124 | + <script> |
| 125 | + document.getElementById("tbl").addEventListener("rowClick", function(event) { |
| 126 | + console.log("Row click: ", event.detail.row); |
| 127 | + }); |
| 128 | + </script> |
| 129 | + |
124 | 130 | </body>
|
125 | 131 |
|
126 | 132 | </html>
|
0 commit comments