Merge pull request #7925 from austinhardaway/fix-collection-multi-select

Fix Multiselect not working in collections
This commit is contained in:
Austin Hardaway authored and GitHub committed 2026-06-05 12:10:30 -04:00
1 parent af9fa7b0be
commit 11e468aee7
2 files changed
+14 -1

No files matched your search

+1
View File
@@ -107,6 +107,7 @@
- [Lampan-git](https://github.com/Lampan-git)
- [lmaotrigine](https://github.com/lmaotrigine)
- [bjorntp](https://github.com/bjorntp)
- [austinhardaway](https://github.com/austinhardaway)
## Emby Contributors
+13 -1
View File
@@ -55,7 +55,14 @@ function onItemSelectionPanelClick(e, itemSelectionPanel) {
}
function updateItemSelection(chkItemSelect, selected) {
const id = dom.parentWithAttribute(chkItemSelect, 'data-id').getAttribute('data-id');
const parentWithId = dom.parentWithAttribute(chkItemSelect, 'data-id');
// If the element doesn't have a parent with data-id, it's not a valid item
if (!parentWithId) {
return;
}
const id = parentWithId.getAttribute('data-id');
if (selected) {
const current = selectedItems.filter(i => {
@@ -90,6 +97,11 @@ function onSelectionChange() {
}
function showSelection(item, isChecked, addInitialCheck) {
// Only add selection checkbox if the item has a data-id attribute
if (!dom.parentWithAttribute(item, 'data-id')) {
return;
}
let itemSelectionPanel = item.querySelector('.itemSelectionPanel');
if (!itemSelectionPanel) {