Skip to content

Commit 81b8a77

Browse files
authored
feat: freeze CRUD edit column to end by default (#4884)
1 parent 82740cd commit 81b8a77

45 files changed

Lines changed: 7 additions & 5 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/crud/src/vaadin-crud-grid.js‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,15 @@ class CrudGrid extends IncludedMixin(Grid) {
6868

6969
/** @private */
7070
__toggleEditColumn() {
71-
const el = this.querySelector('vaadin-crud-edit-column');
71+
let editColumn = this.querySelector('vaadin-crud-edit-column');
7272
if (this.hideEditColumn) {
73-
if (el) {
74-
this.removeChild(el);
73+
if (editColumn) {
74+
this.removeChild(editColumn);
7575
}
76-
} else if (!el) {
77-
this.appendChild(document.createElement('vaadin-crud-edit-column'));
76+
} else if (!editColumn) {
77+
editColumn = document.createElement('vaadin-crud-edit-column');
78+
editColumn.frozenToEnd = true;
79+
this.appendChild(editColumn);
7880
}
7981
}
8082

168 Bytes
178 Bytes
889 Bytes
889 Bytes
1 KB
1.04 KB
179 Bytes
153 Bytes
118 Bytes

0 commit comments

Comments
 (0)