Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to refresh with remote dataSource from another action #209

Open
rednaxus opened this issue Mar 2, 2018 · 2 comments
Open

how to refresh with remote dataSource from another action #209

rednaxus opened this issue Mar 2, 2018 · 2 comments

Comments

@rednaxus
Copy link

rednaxus commented Mar 2, 2018

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
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants