USACE / instrumentation

Instrumentation project issue tracking and project planning
MIT License
4 stars 1 forks source link

Pagination Error - crash on requirement for >= 3 pages #76

Closed lucasb16-exe closed 3 years ago

lucasb16-exe commented 3 years ago

Project instrument browser pagination currently causing crashes when 3 or more pages required in browser with console error 'pages undefined' from pagination.js, problem lies in function call to 'determinePagesToShow' out of pagination/helper.js

Source - https://github.com/USACE/instrumentation-ui/blob/develop/src/app-components/pagination/helper.js line 47

else if (pageCount >= 3) { return pages.slice(1, pageCount - 1).map((_page, i) => createPage(currentPage, setPage, i + 1)); }

Only seeing this on live production, local testing doesn't cause the same problem. Started most likely after pagination overhaul from https://github.com/USACE/instrumentation-ui/commit/cb36c0f55d7c8e18ee6afd054f0bac00f3068f6f

lucasb16-exe commented 3 years ago

Resolved with https://github.com/USACE/instrumentation-ui/pull/71 - closing issue