diff --git a/src/js/widgets/list_of_things/paginated_view.js b/src/js/widgets/list_of_things/paginated_view.js index 8bd5e3e84..5f0c27839 100644 --- a/src/js/widgets/list_of_things/paginated_view.js +++ b/src/js/widgets/list_of_things/paginated_view.js @@ -136,7 +136,7 @@ function ( 'click .toggle-make-space': 'toggleMakeSpace', 'click a.page-control': 'changePageWithButton', 'keyup input.page-control': 'tabOrEnterChangePageWithInput', - 'click .per-page': 'changePerPage' + 'change #per-page-select': 'changePerPage' }, toggleHighlights: function () { @@ -232,9 +232,8 @@ function ( changePerPage: function (e) { e.preventDefault(); - var val = parseInt($(e.target).text().trim()); - if (val === this.model.get('perPage')) return; - this.trigger('pagination:changePerPage', val); + var val = parseInt(e.currentTarget ? e.currentTarget.value : 25); + val !== this.model.get('perPage') && this.trigger('pagination:changePerPage', val); } }); diff --git a/src/js/widgets/list_of_things/templates/pagination-partial.html b/src/js/widgets/list_of_things/templates/pagination-partial.html index 0785a57ac..0980282d2 100644 --- a/src/js/widgets/list_of_things/templates/pagination-partial.html +++ b/src/js/widgets/list_of_things/templates/pagination-partial.html @@ -12,12 +12,18 @@