Skip to content

Commit 8b37da9

Browse files
ROU-10908: Align DataGrid cells vertically to the center (#442)
This PR is for... [Sample page](https://outsystemsui-dev.outsystemsenterprise.com/OutSystemsDataGridSample_ROU10908/Screen2?_ts=638727123084412660) ### 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. ### Test Steps 1. ### Screenshots (prefer animated gif) ### 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 e458b9e + 01736b3 commit 8b37da9

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

styles/Grid.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,30 @@
152152
border-right: var(--datagrid-cell-border-right);
153153
color: var(--datagrid-cell-color);
154154
font-weight: normal;
155-
padding: 14px 8px 0px 8px;
155+
padding: 8px;
156+
157+
&:not(.wj-colgroup):not(.wj-multiline) {
158+
align-content: center;
159+
}
160+
161+
&.wj-align-center.wj-colgroup {
162+
padding-top: 14px;
163+
}
164+
}
165+
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;
156172
}
157173

158174
.wj-flexgrid .wj-grid-editor,
159175
.wj-flexgrid .wj-cell.wj-hasdropdown .wj-btn.wj-btn-glyph.wj-right {
160176
height: auto;
161177
}
162178

163-
.wj-flexgrid .wj-cell.wj-hasdropdown input {
164-
width: 80%;
165-
}
166-
167179
.wj-flexgrid .wj-cell.wj-hasdropdown .wj-dropdown.wj-inputdate input {
168180
width: 100%;
169181
}

0 commit comments

Comments
 (0)