leave edit event
This commit is contained in:
@ -111,9 +111,18 @@ export class GridDropdownColumn extends GridColumn {
|
||||
wrapper
|
||||
});
|
||||
drop.onselected = trigger;
|
||||
if (typeof col.onDropExpanded === 'function') {
|
||||
drop.onexpanded = col.onDropExpanded.bind(col, it.values, drop);
|
||||
}
|
||||
drop.onexpanded = function () {
|
||||
if (it.__editing == null) {
|
||||
it.__editing = {
|
||||
[col.key]: true
|
||||
}
|
||||
} else {
|
||||
it.__editing[col.key] = true;
|
||||
}
|
||||
if (typeof col.onDropExpanded === 'function') {
|
||||
col.onDropExpanded.call(col, it.values, drop);
|
||||
}
|
||||
};
|
||||
return drop.create();
|
||||
}
|
||||
|
||||
@ -201,6 +210,21 @@ export class GridDropdownColumn extends GridColumn {
|
||||
}
|
||||
drop.disabled = enabled === false;
|
||||
}
|
||||
|
||||
static leaveEdit(element, wrapper) {
|
||||
wrapper.querySelectorAll('.ui-drop-box.active').forEach(e => {
|
||||
if (e != null) {
|
||||
e.classList.remove('active');
|
||||
}
|
||||
});
|
||||
const drop = this._getDrop(element);
|
||||
if (drop == null) {
|
||||
return;
|
||||
}
|
||||
if (drop?.multiselect && typeof drop.oncollapsed === 'function') {
|
||||
drop.oncollapsed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class GridCheckboxColumn extends GridColumn {
|
||||
|
Reference in New Issue
Block a user