export DateSelector, fix issue about column.align and filter panel position of the last header cell.

This commit is contained in:
2024-01-30 11:16:57 +08:00
parent df42221b52
commit 0b897cae8a
8 changed files with 133 additions and 30 deletions

View File

@ -560,7 +560,7 @@ export class Dropdown {
}
}
static resolve(dom = document.body) {
static resolve(dom = document.body, trigger) {
const selects = dom.querySelectorAll('select');
for (let sel of selects) {
const source = [...sel.children].map(it => {
@ -572,6 +572,9 @@ export class Dropdown {
tabIndex: sel.tabIndex
});
drop.source = source;
if (typeof trigger === 'function') {
drop.onSelected = item => trigger.call(drop, item);
}
sel.parentElement.replaceChild(drop.create(), sel);
}
return dom;