Merge pull request #5377 from ConnorS1110/fix-multiselect-filter

Fix changing filters not resetting multiselected media cards
This commit is contained in:
Bill Thornton 2024-07-12 15:24:33 -04:00 committed by GitHub
commit 798b408bd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 11 additions and 2 deletions

View File

@ -88,6 +88,7 @@
- [David Angel](https://github.com/davidangel)
- [Pithaya](https://github.com/Pithaya)
- [Chaitanya Shahare](https://github.com/Chaitanya-Shahare)
- [Connor Smith](https://github.com/ConnorS1110)
## Emby Contributors

View File

@ -7,6 +7,7 @@ import '../../elements/emby-collapse/emby-collapse';
import './style.scss';
import ServerConnections from '../ServerConnections';
import template from './filterdialog.template.html';
import { stopMultiSelect } from '../../components/multiSelect/multiSelect';
function renderOptions(context, selector, cssClass, items, isCheckedFn) {
const elem = context.querySelector(selector);
@ -104,6 +105,7 @@ function updateFilterControls(context, options) {
* @param instance {FilterDialog} An instance of FilterDialog
*/
function triggerChange(instance) {
stopMultiSelect();
Events.trigger(instance, 'filterchange');
}

View File

@ -571,3 +571,7 @@ export default function (options) {
export const startMultiSelect = (card) => {
showSelections(card);
};
export const stopMultiSelect = () => {
hideSelections();
};

View File

@ -14,6 +14,7 @@ import ServerConnections from '../components/ServerConnections';
import LibraryMenu from '../scripts/libraryMenu';
import { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
import { ItemSortBy } from '@jellyfin/sdk/lib/generated-client/models/item-sort-by';
import { stopMultiSelect } from 'components/multiSelect/multiSelect';
function getInitialLiveTvQuery(instance, params, startIndex = 0, limit = 300) {
const query = {
@ -1139,6 +1140,9 @@ class ItemsView {
setFilterStatus(hasFilters) {
this.hasFilters = hasFilters;
if (this.hasFilters) {
stopMultiSelect();
}
const filterButtons = this.filterButtons;
if (filterButtons.length) {
@ -1301,4 +1305,3 @@ class ItemsView {
}
export default ItemsView;

View File

@ -321,4 +321,3 @@ export default function (view, params, tabContent, options) {
itemsContainer = null;
};
}