Skip to content

Commit 328244d

Browse files
Align DataGrid cells vertically to the center
1 parent 8b37da9 commit 328244d

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)