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

Use SelectableList in RelationPicker, SingleEntitySelectBase and MultipleEntitySelect #2949

Merged

Conversation

Kanav-Arora
Copy link
Contributor

@Kanav-Arora Kanav-Arora commented Dec 12, 2023

Closes #2747

SelectedItemId state is to be updated if and only if there's a possibility of new id. So now up arrow won't work if 0th item is selected. Same for all other keys.

  • SelectableList used in SingleEntitySelectBase
  • SelectableList used in MultipleEntitySelect

@Kanav-Arora Kanav-Arora changed the title 2747-fix: conditional updation of selectedItemId Use SelectableList in RelationPicker, SingleEntitySelectBase and MultipleEntitySelect Dec 12, 2023
@charlesBochet
Copy link
Member

charlesBochet commented Dec 13, 2023

@Kanav-Arora we were having linter issues (it was broken). I've used your PR to fix it :p
Now, the linter is back but it's showing 2 issues with your PR

Could you pull your branch (I've pushed on it), run "yarn" and then "yarn lint" (from front folder or yarn nx lint twenty-front from root)

@charlesBochet
Copy link
Member

Regarding your fix and the refactoring, LGTM, I will give another try once linter is fixed!

@Kanav-Arora Kanav-Arora marked this pull request as ready for review December 13, 2023 17:56
@Kanav-Arora
Copy link
Contributor Author

Hi @charlesBochet
This PR is ready for merge

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

Thank you! @Kanav-Arora, very helpful as usual!

@charlesBochet charlesBochet merged commit ed2cd40 into twentyhq:main Dec 14, 2023
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor RelationPicker, SingleEntitySelectBase and MultipleEntitySelect to use SelectableList
2 participants