diff --git a/public/scripts/utils.js b/public/scripts/utils.js index dd500efb4..85b4bf861 100644 --- a/public/scripts/utils.js +++ b/public/scripts/utils.js @@ -27,23 +27,23 @@ export const localizePagination = function(container) { }; export const renderPaginationDropdown = function(pageSize, sizeChangerOptions) { - let sizeSelect = `'; if (sizeChangerOptions.indexOf(pageSize) === -1) { - sizeChangerOptions.unshift(pageSize); - sizeChangerOptions.sort((a, b) => a - b); + sizeChangerOptions.unshift(pageSize); + sizeChangerOptions.sort((a, b) => a - b); } for (let i = 0; i < sizeChangerOptions.length; i++) { - sizeSelect += ``; + sizeSelect += ``; } sizeSelect += ``; return sizeSelect; -} +}; export const paginationDropdownChangeHandler = function(event, size) { let dropdown = $(event?.originalEvent?.currentTarget || event.delegateTarget).find('select'); dropdown.find('[selected]').removeAttr('selected'); dropdown.find(`[value=${size}]`).attr('selected', ''); -} +}; /** * Navigation options for pagination.