问题
I'm using custom row header names and there is one that happens to be a little longer than others.
rowHeaders: ["Entree", "", "Plat", "", "Dessert", "", "Prix 2", "Prix 3"]
My question is how do I increase the row header width
?
I have thoroughly checked the documentation without luck.
I've tried using colWidths: 200
in the options
but that only works on everything except row header width.
Options documentation here.
回答1:
Please take a look at this fiddle
You can play with the css of columns to set the width:
.handsontable col.rowHeader {
width: 180px;
}
And here is a working example of your case. If you remove css, you will get exact problem you are facing with. And if you re-add that css line, you will see it works.
Cheers.
回答2:
When creating the table in JS you can add the parameter
new Handsontable(container, {
// ...
rowHeaderWidth: 180,
// ...
})
来源:https://stackoverflow.com/questions/31673255/handsontable-increase-row-header-width