【发布时间】: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