diff --git a/weed/admin/view/app/file_browser.templ b/weed/admin/view/app/file_browser.templ index 576a27ed9..a98132952 100644 --- a/weed/admin/view/app/file_browser.templ +++ b/weed/admin/view/app/file_browser.templ @@ -7,8 +7,12 @@ import ( "github.com/seaweedfs/seaweedfs/weed/admin/dash" ) -script changePageSize(path string, lastFileName string) { - window.location.href = '/files?path=' + encodeURIComponent(path) + '&lastFileName=' + encodeURIComponent(lastFileName) + '&limit=' + this.value +script changePageSize(path string, lastFileName string, pageSizeSelectId string) { + const pageSizeSelect = document.getElementById(pageSizeSelectId) + if (pageSizeSelect == null) { + return + } + window.location.href = '/files?path=' + encodeURIComponent(path) + '&lastFileName=' + encodeURIComponent(lastFileName) + '&limit=' + pageSizeSelect.value } templ FileBrowser(data dash.FileBrowserData) { @@ -94,7 +98,7 @@ templ FileBrowser(data dash.FileBrowserData) {