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 SingleRecordSelectMenuItemsWithSearch #8932

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

bosiraphael
Copy link
Contributor

  • Fix all fields being selected when opening dropdown
  • Fix not being able to set back to no selection when a record is selected and there is only one record to select

Before:

Enregistrement.de.l.ecran.2024-12-06.a.16.26.56.mov

After:

Enregistrement.de.l.ecran.2024-12-06.a.16.25.40.mov

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR fixes dropdown selection behavior in SingleRecordSelectMenuItemsWithSearch by preventing automatic field selection and improving deselection functionality.

  • Modified SingleRecordSelectMenuItemsWithSearch.tsx to use records.selectedRecords[0] for selected record determination
  • Added shouldDisplayDropdownMenuItems condition to prevent automatic selection when dropdown opens
  • Fixed edge case where deselection was impossible with single available record

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@Weiko Weiko requested a review from FelixMalfait December 6, 2024 15:36
Copy link
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

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

Perfect thanks!

@FelixMalfait FelixMalfait merged commit 9c67a10 into main Dec 6, 2024
19 checks passed
@FelixMalfait FelixMalfait deleted the fix-dropdown-all-fields-selected branch December 6, 2024 16:42
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.

2 participants