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

fix(ui): Allows deselection of members in add members modal for a group #8349

Merged
merged 2 commits into from
Jul 30, 2023

Conversation

Sukeerthi31
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Jun 30, 2023
@Sukeerthi31
Copy link
Contributor Author

Steps to reproduce the defect -

  • Route to the following page Settings > Users & Groups > Groups > Select any group > Members tab
  • Upon selecting Add Member, the Add group members modal pops up and users can be searched for and selected.
add-members-modal
  • The deselection of individual members is resulting in a bug and the member does not get deselected, we would have to exit the modal through Cancel and invoke the modal again to add previous selections and exclude the member to be deselected.

@anshbansal anshbansal added the community-contribution PR or Issue raised by member(s) of DataHub Community label Jul 17, 2023
Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

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

nice thank you for this! one quick suggestion but it's not blocking approval. Will merge once CI is green!

Comment on lines +86 to +88
const onDeselectMember = (memberUrn: { key: string; label: React.ReactNode; value: string }) => {
setInputValue('');
const newUserActors = selectedMembers.filter((user) => user !== memberUrn);
const newUserActors = selectedMembers.filter((user) => user.value !== memberUrn.value);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice fix! I would suggest a rename of memberUrn to just member since it's an object we're getting back. definitely not blocking this approval though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your input! Created another PR for the variable rename suggestion since the current one was merged -
#8529

@anshbansal anshbansal merged commit dafb150 into datahub-project:master Jul 30, 2023
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants