change: structure of GridDropdownColumn
This commit is contained in:
parent
39378e9963
commit
70ab06190f
@ -412,6 +412,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-drop-span {
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
>span {
|
||||||
|
margin: var(--spacing-cell);
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: pre;
|
||||||
|
|
||||||
|
&.wrap {
|
||||||
|
@include wrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ui-drop-wrapper {
|
.ui-drop-wrapper {
|
||||||
height: var(--row-height);
|
height: var(--row-height);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -322,6 +322,14 @@ const SymbolDropdown = Symbol.for('ui-dropdown');
|
|||||||
export class GridDropdownColumn extends GridColumn {
|
export class GridDropdownColumn extends GridColumn {
|
||||||
static get canEdit() { return true };
|
static get canEdit() { return true };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
* @returns {HTMLElement}
|
||||||
|
*/
|
||||||
|
static create() {
|
||||||
|
return createElement('span', 'ui-drop-span', createElement('span'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
* @param {Function} trigger
|
* @param {Function} trigger
|
||||||
@ -360,7 +368,7 @@ export class GridDropdownColumn extends GridColumn {
|
|||||||
if (element.tagName === 'DIV') {
|
if (element.tagName === 'DIV') {
|
||||||
return element.children[0].children[0];
|
return element.children[0].children[0];
|
||||||
}
|
}
|
||||||
return element;
|
return element.children[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -424,7 +432,7 @@ export class GridDropdownColumn extends GridColumn {
|
|||||||
if (data != null) {
|
if (data != null) {
|
||||||
val = data[opts?.textKey ?? 'text'];
|
val = data[opts?.textKey ?? 'text'];
|
||||||
}
|
}
|
||||||
super.setValue(element, val);
|
element.children[0].innerText = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user