free pages stack on search start

pull/2056/head
Ayrat Badykov 6 years ago
parent c71d372831
commit 8a49b546c7
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 6
      apps/block_scout_web/assets/js/pages/address/logs.js

@ -16,6 +16,9 @@ export function reducer (state, action) {
case 'ELEMENTS_LOAD': { case 'ELEMENTS_LOAD': {
return Object.assign({}, state, _.omit(action, 'type')) return Object.assign({}, state, _.omit(action, 'type'))
} }
case 'START_SEARCH': {
return Object.assign({}, state, {pagesStack: []})
}
default: default:
return state return state
} }
@ -59,6 +62,9 @@ if ($('[data-page="address-logs"]').length) {
$element.on('click', '[data-search-button]', (event) => { $element.on('click', '[data-search-button]', (event) => {
store.dispatch({
type: 'START_SEARCH',
addressHash: addressHash})
loadSearchItems() loadSearchItems()
}) })
} }

Loading…
Cancel
Save