【问题标题】:Only save icon not appear in material table只有保存图标不会出现在材质表中
【发布时间】:2020-12-03 05:19:49
【问题描述】:

我只有保存图标在可编辑表中没有出现错误。外部操作图标有效,但内部操作无效。

点击更新操作

点击添加动作

点击删除操作

动作图标和新动作是工作

<MaterialTable  title="Selling" columns={columns} data={data} icons={tableIcons} 
表格图标
const tableIcons = {
     Save: forwardRef((props: any, ref: any) => <Save {...props} ref={ref} />),
     Add: forwardRef((props: any, ref: any) => <AddBox {...props} ref={ref} />),
     Edit: forwardRef((props: any, ref: any) => <Edit {...props} ref={ref} />),
     Delete: forwardRef((props: any, ref: any) => <Delete {...props} ref={ref} />),
     Cancel: forwardRef((props: any, ref: any) => <Cancel {...props} ref={ref} />),
     Clear: forwardRef((props: any, ref: any) => <Clear {...props} ref={ref} />),
 };

【问题讨论】:

    标签: typescript material-table


    【解决方案1】:
    import Check from '@material-ui/icons/Check';
    Check: forwardRef((props: any, ref: any) => <Check {...props} ref={ref} />),
    

    添加检查图标

    【讨论】:

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