【问题标题】:HandsonTable in IE11 Does Not Render Data Columns Lined Up with Header ColumnsIE11 中的 HandsonTable 不呈现与标题列对齐的数据列
【发布时间】:2016-12-09 14:16:28
【问题描述】:

我在 Chrome 中使用 Handsontable 开发了我的网络应用程序。这很有趣,而且效果很好。

但现在我正试图让它在 IE11 中工作,但它存在严重的渲染问题。

第一个也是这个问题的主题是网格的实际宽度与标题不匹配。这是一张图片:

通过将这种样式添加到我的应用中,我可以让它接近工作:

.wtHolder {
    width: 100% !important;
}

但他们仍然没有正确排列,而且在动手课堂上必须做一个!important 似乎有点麻烦。

有没有办法让它在 IE11 中看起来正确?

附加信息:

当我创建这个可动手操作的实例时,我设置了以下选项:

createOptions(): ht.Options {
    let options: ht.Options = {};

    options.data = this.tableData;
    options.colHeaders = true;
    options.colHeaders = this.columnHeaders;
    options.colWidths = this.columnWidths;
    options.stretchH = 'all';
    options.columns = this.columnMappings;
    options.minSpareRows = this.minSpareRows;
    options.readOnly = this.isReadOnly;

    return options;
}

更新:

错误的来源似乎是div,其类设置为wtHolder。问题不是wtHolderdivstyle="width: 41.66%"

如果我删除那个width,那么网格会正确显示。不知道如何在代码中删除它(因为这是由 handsontable 设置的)。

【问题讨论】:

  • 设置选项的代码看起来有语法错误。你没有声明一个函数。
  • @4castle - 我可能应该提到,但那是打字稿。

标签: typescript handsontable


【解决方案1】:

这种风格似乎解决了这个问题:

/*IE11 does not display widths correctly.  This fixes that error.*/
.wtHolder {
    width: auto !important;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-13
    • 1970-01-01
    • 2017-08-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多