【问题标题】:How to disable automaticRefreshEnabled flag in react admin?如何在反应管理员中禁用自动刷新启用标志?
【发布时间】:2021-04-22 11:08:34
【问题描述】:

const mapStateToProps = (state) => ({ automaticRefreshEnabled: state.admin.ui.automaticRefreshEnabled });

我们如何将 automaticRefreshEnabled 更改为 false?

【问题讨论】:

    标签: reactjs react-admin


    【解决方案1】:

    试试这个:

    import { useDispatch } from 'react-redux'
    import { setAutomaticRefresh } from 'react-admin'
    ...
    const dispatch = useDispatch()                         
    dispatch(setAutomaticRefresh(false))
    

    【讨论】:

      猜你喜欢
      • 2013-12-13
      • 2020-09-29
      • 2016-09-24
      • 2020-10-28
      • 2011-06-30
      • 1970-01-01
      • 2019-05-01
      • 2011-12-11
      • 2021-04-06
      相关资源
      最近更新 更多