【问题标题】:Using Ag-Grid Custom Cell Editor and withStyles generated higher order component in Material UI使用 Ag-Grid 自定义单元格编辑器和 withStyles 在 Material UI 中生成高阶组件
【发布时间】:2019-01-18 00:28:42
【问题描述】:

我是 react/material-ui/ag-grid 的新手,我希望使用 ag-grid/react 添加一个 Material UI 组件作为单元格编辑器(通过弹出窗口)。

我在组件文件中使用以下标准行:

export default withStyles(styles)(ControlledOpenSelect).

这会产生一个似乎会破坏 ag-grid 的高阶组件。我仔细阅读了有关使用带有更高阶组件here 的 ag-grid 的文档,但对如何以与 ag-grid 兼容的方式使用 forwardRefs 和 withStyles 函数有些困惑。举个例子会很有帮助。

【问题讨论】:

    标签: material-ui ag-grid-react


    【解决方案1】:

    不确定这是否相关,但可能上下文在您的 ag-grid 中不可用尝试将 reactNext={true} 作为道具放入您的 AgGridReact 组件中

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-11
      • 2020-06-08
      • 2019-08-08
      • 1970-01-01
      • 2020-02-19
      • 2021-03-14
      相关资源
      最近更新 更多