1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix number option in alphapicker

This commit is contained in:
Bill Thornton 2022-01-04 10:07:07 -05:00
parent 43b477637f
commit 5e247f094d
6 changed files with 62 additions and 71 deletions

View file

@ -99,7 +99,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
}
window.scrollTo(0, 0);
updateFilterControls(page);
this.alphaPicker?.updateControls(query);
let html;
const pagingHtml = libraryBrowser.getQueryPagingHtml({
startIndex: query.StartIndex,
@ -167,11 +167,6 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
});
};
const updateFilterControls = (tabContent) => {
const query = getQuery(tabContent);
this.alphaPicker.value(query.NameStartsWith);
};
const data = {};
let isLoading = false;
@ -201,7 +196,13 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
alphaPickerElement.addEventListener('alphavaluechanged', function (e) {
const newValue = e.detail.value;
const query = getQuery(tabContent);
query.NameStartsWith = newValue;
if (newValue === '#') {
query.NameLessThan = 'A';
delete query.NameStartsWith;
} else {
query.NameStartsWith = newValue;
delete query.NameLessThan;
}
query.StartIndex = 0;
reloadItems(tabContent);
});
@ -234,9 +235,9 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
initPage(tabContent);
onViewStyleChange();
this.renderTab = function () {
this.renderTab = () => {
reloadItems(tabContent);
updateFilterControls(tabContent);
this.alphaPicker?.updateControls(getQuery(tabContent));
};
this.destroy = function () {};