Open anujgakhar opened 7 years ago
I would expect you could dispatch GRIDDLE_UPDATE_STATE
(actions.updateState
) with { data: null }
to switch back to Loading. Or there's no reason you couldn't use reducers for the pagination action types to set/unset an explicit Loading state.
@dahlbyk thanks for the reply, you got an example of this? I can't seem to get it working. If I dispatch an actions.updateState onClick of NextButton, there's a runtime error at line 60 of dataUtils.js
I do not have a working example handy, no. If you could put together a basic repro I would be glad to take a closer look.
Griddle version
1.9
Expected Behavior
To show Loading state when external data is loading on Next or Previous button click
Actual Behavior
I see a 'No results found' message when the call is in flight because the current dataLoadingSelector just checks for existence of data
Steps to reproduce
Whenever I hook in the onNext and onPrevious events to fetch external data
I've written my own plugin that changes some of the Pagination components and buttons and it works well. However, when I click 'Next' or 'Previous', instead of seeing a 'Loading' state, I see a 'NoResults' state in the Table. Is there an easy way to tell Griddle that external data is loading so it can show the correct state ?