mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
Add auto scroll top when using paging
This commit is contained in:
parent
82dbfce374
commit
df0da76312
@ -50,7 +50,9 @@ export default function (view, params, tabContent) {
|
||||
if (userSettings.libraryPageSize() > 0) {
|
||||
query.StartIndex += query.Limit;
|
||||
}
|
||||
reloadItems(context);
|
||||
reloadItems(context).then(() => {
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function onPreviousPageClick() {
|
||||
@ -61,7 +63,9 @@ export default function (view, params, tabContent) {
|
||||
if (userSettings.libraryPageSize() > 0) {
|
||||
query.StartIndex = Math.max(0, query.StartIndex - query.Limit);
|
||||
}
|
||||
reloadItems(context);
|
||||
reloadItems(context).then(() => {
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
}
|
||||
|
||||
const query = getQuery();
|
||||
@ -114,7 +118,7 @@ export default function (view, params, tabContent) {
|
||||
const query = getQuery();
|
||||
const apiClient = ApiClient;
|
||||
query.UserId = apiClient.getCurrentUserId();
|
||||
apiClient.getLiveTvChannels(query).then(function (result) {
|
||||
return apiClient.getLiveTvChannels(query).then(function (result) {
|
||||
renderChannels(context, result);
|
||||
loading.hide();
|
||||
isLoading = false;
|
||||
|
Loading…
Reference in New Issue
Block a user