Layout Mode
If you want columns to resize then you should look at using the fitColumns layout mode. in the table constructor you should set this on the layout
option:
var table = new Tabulator("#example-table", {
layout:"fitColumns",
});
This can be seen on the Fit To Width Example
Tabulator provides many options for configuring this layout mode to choose how to resize each column. More info on this can be found in the Layout Documentation
Frozen Columns
If you would alternatively like the column to remain where it is, even when the table is scrolled horizontally then you can use the frozen
property on the column definition for the dob
column to freeze it in place:
{title:"Date of Birth", field:"dob", frozen:true}}
More details on this can be found in the Frozen Columns DOcumentation
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…