Handsontable increase row header width

2019-07-12 19:25发布

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.

t missing

I've tried using colWidths: 200 in the options but that only works on everything except row header width.

Options documentation here.

2条回答
兄弟一词,经得起流年.
2楼-- · 2019-07-12 20:04

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.

查看更多
Anthone
3楼-- · 2019-07-12 20:22

When creating the table in JS you can add the parameter

new Handsontable(container, {
    // ...
    rowHeaderWidth: 180,
    // ...
})
查看更多
登录 后发表回答