Welcome

カキノタblog

気の向くままに自分の興味あるテーマを中心に、なるべく図解多めに記事を書いていきます。

カスタマイズ・Tips

Tips

ソートする

指定したフィールド名(id)で降順にソートするコード。

tabulator.on("tableBuilt",()=>{
	tabulator.setSort("id","desc")
})

テーブル生成時に先頭行の先頭セルに編集状態でフォーカスを合わせる

tabulator.on("tableBuilt",()=>{
	let row = tabulator.getRowFromPosition(1);
	row.getCell('title').edit();
})

参考:Set focus on the first cell of the first row when table is shownSet focus on the first cell of the first row when table is shown