作成日: 2024/08/21 最終更新日: 2024/12/20
文書種別
制限事項
発生環境
5.20241.9以降のバージョンで発生
状況
回避方法あり
詳細
ツリーグリッドで子ノードを選択した状態でコンポーネントを再レンダリングすると、FlexGridのselectionのrow2プロパティとrowSpanプロパティの値が不正になります。
回避方法
【回避方法1】
以下の処理を追加します。
【回避方法2】
childItemsPathプロパティに変数を経由して値を設定します。
以下の処理を追加します。
import * as wjGrid from '@mescius/wijmo.grid';
let oldFun = (wjGrid as any).FlexGrid.prototype._bindGrid;
(wjGrid as any).FlexGrid.prototype._bindGrid = function (e) {
let sel = this.selection;
oldFun.call(this, e);
if (this.preserveSelectedState && this._cv && !this._cv.currentItem && this.childItemsPath) {
this.selection = sel;
}
};
【回避方法2】
childItemsPathプロパティに変数を経由して値を設定します。
const [child] = useState(['children']);
・・・
<FlexGrid
childItemsPath={child}