如何在此下拉菜单中允许固定高度? (柱车)
我一直在无休止地摆弄以解决高度问题。我想要一个固定高度的下拉菜单,最大 300px。我用过AutoRowSize高度功能和其他高度功能在可操作的网站中,但似乎都不起作用。
我已经没有想法了。我可以尝试什么建议或替代方案吗?
我正在使用 Handsontable in Handsontable 功能 ( Found Here )。
fiddle http://jsfiddle.net/72dgoLva/3/
columns: [
{
type: 'handsontable',
handsontable: {
colHeaders: ['Marque', 'Country', 'Parent company'],
autoColumnSize: true,
data: manufacturerData,
getValue: function() {
var selection = this.getSelectedLast();
// Get always manufacture name of clicked row
return this.getSourceDataAtRow(selection[0]).name;
},
}
},
{type: 'numeric'}
]
最佳答案
.handsontableEditor .ht_master {
height: 300px;
overflow-y: auto !important;
width: calc(100% + 2px);
}
.handsontableEditor .ht_clone_top {
transform: none !important;
}
...似乎可以完成这项工作。 Updated fiddle .
我必须使用 !important
来动态覆盖 HoT 在元素上放置的内联样式。为了限制影响其他实例的可能性,请为选择器添加该实例的特定标识符前缀。
关于javascript - Handsontable中的Handsontable下拉高度调整,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51317426/