【问题标题】:Disable undo function in react-admin for List view在 react-admin 中禁用列表视图的撤消功能
【发布时间】:2023-03-06 06:38:01
【问题描述】:

可以为EditCreate 组件设置属性undoable={false}。这成功地禁用了撤消功能。

似乎此属性不适用于List 视图。对吗?

用例:

用户在List 视图中。她选择了一个项目并选择删除它。删除不得撤消。

【问题讨论】:

    标签: react-admin


    【解决方案1】:

    对于List,必须在DeleteButton中指定undoable属性:

    <List {...props} >
    <Datagrid>
      ...
      <DeleteButton undoable={true} />
    </Datagrid>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-15
      • 1970-01-01
      • 1970-01-01
      • 2019-04-13
      • 2017-10-28
      • 2014-03-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多