作成日: 2024/03/29 最終更新日: 2024/08/07
文書種別
不具合
状況
修正済み
詳細
列グループの「+」「-」ボタンが列の境界線上にある場合、ボタンを押下しても反応せず展開・縮小ができません。
回避方法
この問題はバージョン5.20241.19で修正されました。
修正版を適用しない場合の回避方法は次の通りです。
ホスト要素のクリックイベントに以下を設定します。
theGrid.hostElement.addEventListener(
"click",
(e) => {
let ht = theGrid.hitTest(e.pageX, e.pageY);
if (ht.panel && theGrid.columnHeaders && ht.panel.cellType == wijmo.grid.CellType.ColumnHeader) {
if (wijmo.closestClass(e.target, "wj-elem-collapse")) {
let targetGroup = theGrid._getColumnGroup(ht.row, ht.col), isCollapsed = targetGroup.isCollapsed;
if (targetGroup) {
// Collapse/Expand all the groups at the same level when Ctrl+Click is performed.
if (e.ctrlKey || e.metaKey) {
let groups = [];
for (let col = 0; col < theGrid.columns.length; col++) {
let currentGroup = theGrid._getColumnGroup(ht.row, col);
if (
currentGroup &&
currentGroup.collapseTo &&
currentGroup.level == targetGroup.level &&
groups.indexOf(currentGroup) < 0
) {
groups.push(currentGroup);
currentGroup.isCollapsed = !isCollapsed;
}
}
} else {
targetGroup.isCollapsed = !targetGroup.isCollapsed;
}
}
e.preventDefault();
}
}
},
true
);