UNPKG

@empathyco/x-components

Version:
19 lines (17 loc) 610 B
/** * Default implementation for the {@link SearchActions.increasePageAppendingResults}. * * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions, * provided by Vuex. * * @public */ const increasePageAppendingResults = ({ commit, state }) => { const newPage = state.page + 1; if (newPage >= 1 && state.page * state.config.pageSize < state.totalResults) { commit('setPage', newPage); commit('setIsAppendResults', true); } }; export { increasePageAppendingResults }; //# sourceMappingURL=increase-page-apending-results.action.js.map