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 empty option selected in single entity select #8208

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

ijreilly
Copy link
Collaborator

SingleEntitySelect was wrongfully showing the empty option (eg "No company") as selected if the selected option was not showing in the list, because of a search filter for instance (eg selected option is "Linkedin" but search filter is "a").

Fixing this and removing misleading prop selectedEntity from components where it is never passed.

@@ -181,7 +183,7 @@ export const SingleEntitySelectMenuItems = ({
onClick={() => onEntitySelected()}
LeftIcon={EmptyIcon}
text={emptyLabel}
selected={!selectedEntity}
selected={shouldSelectEmptyOption || false}
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldSelectEmptyOption === true

@ijreilly ijreilly merged commit e5d492d into main Oct 31, 2024
18 checks passed
@ijreilly ijreilly deleted the fix-empty-option-selected branch October 31, 2024 08:41
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.

3 participants