reactjs - 如何在反应管理员中禁用自动刷新启用标志?
问题描述
const mapStateToProps = (state) => ({ automaticRefreshEnabled: state.admin.ui.automaticRefreshEnabled });
我们如何将 automaticRefreshEnabled 更改为 false?
解决方案
尝试这个:
import { useDispatch } from 'react-redux'
import { setAutomaticRefresh } from 'react-admin'
...
const dispatch = useDispatch()
dispatch(setAutomaticRefresh(false))
推荐阅读
- r - Highcharter 工具提示不适用于许多系列
- javascript - backgroundColor 以空字符串的形式出现,当我设置它的值时不会在屏幕上改变
- javascript - 如何使用 javascript 更改导航上的活动导航栏图标
- linux - 如何抑制 grep 的错误输出,使其仅返回退出状态?
- database - MongoDB:如何处理两个用户同时上传相同的用户名或密码
- github - 我如何从 Github 安装文件
- python - Python:我在为 Instagram 创建机器人时遇到错误,我该如何解决?
- ios - 使用 Swift 在 Firebase 中进行 GeoHash 查询
- excel - Excel VBA AutoFilter 选择过滤器等于 key1 和 key2 最小值的行
- javascript - 如何从后台注入内容脚本