Skip to content

Commit

Permalink
Show blank tables as page 0 of 0 (instead of 0 of 1) and disable the …
Browse files Browse the repository at this point in the history
…page input field in this case too
  • Loading branch information
neonbunny committed Aug 21, 2024
1 parent 2ce8813 commit 99a9c01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion event_tracker/static/scripts/bootstrap_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@
max: pageInfo.pages,
}).val(pageInfo.page + 1);

if (pageInfo.pages === 1) {
if (pageInfo.pages <= 1) {
$input.prop("disabled", true)

if (pageInfo.pages === 0) {
$input.val(0)
}
}

var changeHandler = function (e) {
Expand Down

0 comments on commit 99a9c01

Please sign in to comment.