-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add removal of items in multi-selection for collections #6800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Changes: Implement Remove from collections for multiselect in the collections screen. (issue jellyfin#6772) Issues: N/A
Cloudflare Pages deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint doesn't pass. Please fix all ESLint issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint doesn't pass. Please fix all ESLint issues.
Co-authored-by: viown <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you have a race condition in your code that can sometimes prevent the "Remove from collection" menu item from showing.
If this promise resolves before this promise, collectionItem
will be null
and the menu item will not be added.
Instead, you'll need to re-structure your promises to follow an A -> B -> C structure. You can refactor your collection fetch call:
const collectionPromise = collectionId ? apiClient.getItem(user.Id, collectionId) : Promise.resolve(null)
Then wrap the previous promise with:
collectionPromise.then(collectionItem => {
...
})
Changes:

Implement Remove from collections for multiselect in the collections screen. (issue #6772)
Issues:
N/A