gpt4 book ai didi

reactjs - 如何在休息时刷新管理中的 ListView

转载 作者:行者123 更新时间:2023-12-03 13:28:20 25 4
gpt4 key购买 nike

我正在尝试在成功执行自定义操作后刷新列表。

我在休息教程中使用了管理员的传奇

function * actionApproveSuccess () {
yield put(showNotification('Executed'))
yield put(push('/comments'))
// does not refresh, because the route does not change
// react-redux-router also has no refresh() method, like react-router has...
}

我的另一个想法是以某种方式触发列表组件的刷新操作,但我不知道如何访问它或如何将其连接到 ACTION_SUCCESS 事件。

最佳答案

无法通过React Router刷新路由,那就是known problem 。休息管理员的List组件有 its own refresh mechanism ,但不提供 API。

我的建议是使用自定义 <List>基于 admin-on-rest 的组件。如果你找到一种方法来暴露 refresh行动起来,随时在 aor 存储库上打开 PR!

关于reactjs - 如何在休息时刷新管理中的 ListView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43212627/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com