Hello,
Are there any plans to introduce a parameter for the minimum cell width when the auto resizer is used? It seems it’s 50px at this time, which makes the title too big for our use case. Can this value be changed in any way?
Thank you!
Hello,
Are there any plans to introduce a parameter for the minimum cell width when the auto resizer is used? It seems it’s 50px at this time, which makes the title too big for our use case. Can this value be changed in any way?
Thank you!
Hi @rslite , I don’t think there are any plans to add a minWidth parameter, but you can work around it using the modifyColWidth hook.
hot.addHook('modifyColWidth', function (width, column) {
// AutoColumnSize measures the true content width but floors it at 50.
// Recover the raw width (keepMinimum=false => no floor), then apply your own minimum:
const raw = this.getPlugin('autoColumnSize').getColumnWidth(column, undefined, false);
const MY_MIN = 18;
return (typeof raw === 'number' && !isNaN(raw)) ? Math.max(raw, MY_MIN) : width;
});
This should let you define a new minimum width that will override the 50px limit. If this doesn’t work for your use case, please let me know and we can look into filing a feature request for the minWidth param.