Handsontable increase row header width

天大地大妈咪最大 提交于 2019-12-11 03:33:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!