【问题标题】:Handsontable in Handsontable Dropdown Height AdjustmentHandsontable 中的 Handsontable 下拉高度调整
【发布时间】:2018-12-21 09:08:00
【问题描述】:

如何在此下拉菜单中允许固定高度? (柱车)

我一直在不停地摆弄以解决高度问题。我想要一个最大 300 像素的固定高度下拉菜单。我在handsontable 网站中使用了AutoRowSize 高度功能和其他高度功能,但似乎都没有用。

我的想法已经用完了。我可以尝试任何建议或替代方案吗?

我正在使用 Handsontable 中的 Handsontable 功能 (Found Here)。

小提琴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'}

]

【问题讨论】:

    标签: javascript jquery css angularjs handsontable


    【解决方案1】:
    .handsontableEditor .ht_master {
        height: 300px;
        overflow-y: auto !important;
        width: calc(100% + 2px);
    }
    .handsontableEditor .ht_clone_top {
        transform: none !important;
    }
    

    ... 似乎完成了这项工作。 Updated fiddle.

    我不得不使用!important 来覆盖由HoT 放置在元素上的内联样式。为了限制这种影响其他实例的可能性,请在选择器前面加上该实例的特定标识符。

    【讨论】:

    • 谢谢。这就是我一直在寻找的。​​span>
    猜你喜欢
    • 2020-01-04
    • 2016-02-27
    • 2020-05-10
    • 2015-05-29
    • 2015-04-15
    • 2015-10-04
    • 1970-01-01
    • 2015-10-19
    • 2015-03-30
    相关资源
    最近更新 更多