change: structure of GridDropdownColumn

This commit is contained in:
2024-03-08 11:02:04 +08:00
parent 39378e9963
commit 70ab06190f
2 changed files with 26 additions and 2 deletions

View File

@ -322,6 +322,14 @@ const SymbolDropdown = Symbol.for('ui-dropdown');
export class GridDropdownColumn extends GridColumn {
static get canEdit() { return true };
/**
* @ignore
* @returns {HTMLElement}
*/
static create() {
return createElement('span', 'ui-drop-span', createElement('span'));
}
/**
* @ignore
* @param {Function} trigger
@ -360,7 +368,7 @@ export class GridDropdownColumn extends GridColumn {
if (element.tagName === 'DIV') {
return element.children[0].children[0];
}
return element;
return element.children[0];
}
/**
@ -424,7 +432,7 @@ export class GridDropdownColumn extends GridColumn {
if (data != null) {
val = data[opts?.textKey ?? 'text'];
}
super.setValue(element, val);
element.children[0].innerText = val;
}
/**