josecebe / twbs-pagination

jQuery pagination plugin (bootstrap powered)
http://josecebe.github.io/twbs-pagination/
Other
1.1k stars 401 forks source link

Hiding when single page breaks functionality #136

Closed richgoldmd closed 7 years ago

richgoldmd commented 7 years ago

There was a recent change that involves this code:

        // hide if only one page exists
        if (this.options.totalPages == 1) {
            return this;
        }

This breaks functionality, as the controls aren't built and the onPageClick is not called for the first page. In my project we use this to power an ajax driven data loader, by tearing down and rebuilding the control, but we never get the initial event to load the data. This functionality should be optional if it remains.

eugenesimakin commented 7 years ago

Hi! Please, check the fix

richgoldmd commented 7 years ago

Nice! Works perfectly. Thank you, and thanks for an excellent plugin