Skip to content

Commit ae66304

Browse files
ROU-10908: Align DataGrid cells vertically to the center (#443)
This PR is for fixing the align of the content in the cells. ### What was happening * The visual experience of editing DataGrid cells was undesirable. ### What was done * All DataGrid cells are now vertically aligned to the center, including when being edited. ### Checklist * [x] tested locally * [ ] documented the code * [x] clean all warnings and errors of eslint * [ ] requires changes in OutSystems (if so, provide a module with changes) * [ ] requires new sample page in OutSystems (if so, provide a module with changes)
2 parents 8b37da9 + 328244d commit ae66304

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

styles/Grid.css

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,31 @@
163163
}
164164
}
165165

166-
.wj-hasdropdown input.wj-grid-editor.wj-form-control {
167-
padding-right: 18px; /* to account for arrow width */
168-
}
169-
170-
.wj-cell.wj-hasdropdown.wj-align-left {
171-
display: block;
172-
}
173-
174166
.wj-flexgrid .wj-grid-editor,
175167
.wj-flexgrid .wj-cell.wj-hasdropdown .wj-btn.wj-btn-glyph.wj-right {
176168
height: auto;
177169
}
178170

179-
.wj-flexgrid .wj-cell.wj-hasdropdown .wj-dropdown.wj-inputdate input {
180-
width: 100%;
171+
.is-ltr .wj-cell:has(.wj-elem-dropdown) {
172+
padding-right: 30px;
173+
}
174+
.is-rtl .wj-cell:has(.wj-elem-dropdown) {
175+
padding-left: 30px;
176+
}
177+
.wj-cell.wj-hasdropdown.wj-align-left {
178+
position: relative;
179+
}
180+
.is-ltr .wj-cell:not(.wj-header) > .wj-elem-dropdown,
181+
.is-rtl .wj-cell:not(.wj-header) > .wj-elem-dropdown {
182+
position: absolute;
183+
top: 50%;
184+
transform: translateY(-50%);
185+
}
186+
.is-ltr .wj-cell:not(.wj-header) > .wj-elem-dropdown {
187+
right: 10px;
188+
}
189+
.is-rtl .wj-cell:not(.wj-header) > .wj-elem-dropdown {
190+
left: 10px;
181191
}
182192

183193
.wj-flexgrid .wj-header.wj-cell label:before {

0 commit comments

Comments
 (0)