how to refresh with remote dataSource from another action
Opened this issue · 2 comments
rednaxus commented
Suppose I have another component that does something that makes me want to re-load the remote dataSource. I should be able to call an action to reload, how do I do this?
diego-inflightvr commented
Hi @rednaxus,
It's probably too late to answer your question, but just in case... This is how I did it:
import { Actions } from 'react-redux-grid'
store.dispatch(
Actions.GridActions.getAsyncData({
showTreeRootNode: false,
stateKey,
dataSource: treeDataSource,
type: gridType
}))
Cheers,
Diego
jiangenhe commented
In my case, I just gave a new key value to Grid component, which will force Grid to be remounted and reload all data. It may not be best way in terms of rendering performance but easy to be made.