V
V
v_i_rus2021-11-26 12:53:04
JavaScript
v_i_rus, 2021-11-26 12:53:04

Why does react-bootstrap-4-pagination output extra pages?

when using react-bootstrap-4-pagination, I see this picture. total 11 pages.
61a0add475590728961644.png
pagination config

totalPages: 11,
            currentPage: 10,
            showMax: (totalPages === currentPage)? 1 : 5,
            size: "md",
            threeDots: true,
            prevNext: true,
            onClick: (page) => {
                callback(page);
                let url = new URL(window.location.href);
                url.searchParams.delete('page');
                if (page > 1) {
                    url.searchParams.append('page', page);
                }
                history.pushState('', '', url.toString());
            }


how to fix the presence of extra pages in the list and duplicate links to the last one?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
v_i_rus, 2022-03-21
@v_i_rus

I decided to install another paginator, this error is not fixed in principle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question