Skip to content
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

refactor: remove use of calculateSplices in user tags #8495

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomivirkki
Copy link
Member

Description

Remove the use of calculateSplices in <vaadin-user-tags> as suggested in #8494 (review)

Type of change

Refactor

Comment on lines -250 to -252
// Filter out users that are only moved
const addedUsers = usersToAdd.filter((u) => !usersToRemove.some((u2) => u.id === u2.id));
const removedUsers = usersToRemove.filter((u) => !usersToAdd.some((u2) => u.id === u2.id));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC we added this explicit id check since the Collaboration Kit calls setUsers() every time with a new array of objects, so the new comparison should probably be adjusted accordingly instead of using .includes().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants