change: sample structure
fix: tooltip of some readonly column in editing mode feature: adapt filter panel's height
This commit is contained in:
lib/ui
sample
fonts
language
@@ -3311,6 +3311,12 @@ export class Grid {
|
||||
totalWidth - FilterPanelWidth :
|
||||
offsetLeft + (width > FilterPanelWidth ? width - FilterPanelWidth : 0);
|
||||
panel.style.left = `${left}px`;
|
||||
const maxHeight = this._var.el.offsetHeight - this._var.headerHeight;
|
||||
if (maxHeight < 300) {
|
||||
panel.style.height = `${maxHeight}px`;
|
||||
} else {
|
||||
panel.style.height = '';
|
||||
}
|
||||
|
||||
// search
|
||||
let searchbox;
|
||||
@@ -3810,8 +3816,14 @@ export class Grid {
|
||||
// sub ui-grid
|
||||
return;
|
||||
}
|
||||
const col = target.dataset.col;
|
||||
const row = target.dataset.row;
|
||||
if (this._var.virtualRows[row]?.editing) {
|
||||
if (holder.dataset.row === row &&
|
||||
holder.dataset.col === col) {
|
||||
return;
|
||||
}
|
||||
const type = this._var.colTypes[this.columns[col]?.key];
|
||||
if (type?.canEdit && this._var.virtualRows[row]?.editing) {
|
||||
delete holder.dataset.row;
|
||||
delete holder.dataset.col;
|
||||
if (holder.classList.contains('active')) {
|
||||
@@ -3819,12 +3831,6 @@ export class Grid {
|
||||
}
|
||||
return;
|
||||
}
|
||||
const col = target.dataset.col;
|
||||
if (holder.dataset.row === row &&
|
||||
holder.dataset.col === col) {
|
||||
return;
|
||||
}
|
||||
const type = this._var.colTypes[this.columns[col]?.key];
|
||||
let element = target.children[0];
|
||||
if (type != null && typeof type.getElement === 'function') {
|
||||
element = type.getElement(element);
|
||||
|
Reference in New Issue
Block a user