【问题标题】:Cannot drag and drop columns in ag-grid toolbar无法在 ag-grid 工具栏中拖放列
【发布时间】:2018-09-08 21:19:02
【问题描述】:

我正在查看the first demo on the row grouping page of the ag-grid documentation,拖放行为似乎不正确。

我可以从 行组 部分中删除列,但我无法将它们重新添加回来。我在 Firefox 和 chrome 上都试过这个。我在 Mac 上。

我还在控制台中看到以下警告:

ag-Grid: count not find callback onExpandClicked
(anonymous) @ ag-grid-enterprise.min.js:
ag-grid-enterprise.min.js:2 ag-Grid: count not find callback onSelectClicked
(anonymous) @ ag-grid-enterprise.min.js:2
ag-grid-enterprise.min.js:2 ag-Grid: count not find callback onFilterTextChanged

所以,看起来有些回调没有被注册,这阻碍了拖放工作。

我还创建了一个plunkr here,这可能会使事情更容易验证。请注意,这个 plunkr 与上面链接的演示没有变化。

我在 Firefox 和 chrome 上都尝试过使用 ag-grid 版本 15.0.0 和 17.0.0。

那么,为什么拖放不起作用?

【问题讨论】:

  • 您是否尝试使用 ToolPanel 拖动?如果是这样,您需要在列 def 上使用“enableRowGroup: true”,而不是“rowGroup:true”
  • 是的,就是这样。看起来演示已经过时了。 rowGroup:true 不再有效。如果您将其作为答案,我会将其标记为正确。我已经为此提出了一个 github 问题。
  • 完成!我认为 rowGroup 实际上可能仍然在工具面板之外做一些事情,但我没有进一步研究它。祝你好运。

标签: drag-and-drop ag-grid


【解决方案1】:

查看 plunkr,似乎可能存在拼写错误和/或过时的配置演示。你是“enableRowGroup:true”而不是“rowGroup:true”。

【讨论】:

    猜你喜欢
    • 2022-09-29
    • 2021-06-22
    • 2019-04-12
    • 1970-01-01
    • 1970-01-01
    • 2021-03-10
    • 2017-04-30
    • 1970-01-01
    • 2022-06-18
    相关资源
    最近更新 更多