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

Menu: Fix typeahead with leading visuals #1914

Merged
merged 3 commits into from Mar 2, 2022

Conversation

siddharthkp
Copy link
Contributor

@siddharthkp siddharthkp commented Mar 1, 2022

When there is a leading visual present, the textContent has an extra space which means we are not able to find the matching item. Add a trim() solves this issue.

image

Without trim: ' Text', ' Number'
With trim: 'Text', 'Number'

@siddharthkp siddharthkp requested review from a team and mperrotti March 1, 2022 16:39
@changeset-bot
Copy link

changeset-bot bot commented Mar 1, 2022

🦋 Changeset detected

Latest commit: aadb472

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@siddharthkp siddharthkp requested review from colebemis and removed request for mperrotti March 1, 2022 16:39
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 64.24 KB (0%)
dist/browser.umd.js 64.6 KB (0%)

"@primer/react": patch
---

Menu: Fix typeahead with leading visuals
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this say ActionMenu?

@siddharthkp siddharthkp enabled auto-merge (squash) March 2, 2022 12:53
@siddharthkp siddharthkp merged commit b651d70 into main Mar 2, 2022
@siddharthkp siddharthkp deleted the siddharth/fix-typeahead-with-leadingvisual branch March 2, 2022 12:58
@primer-css primer-css mentioned this pull request Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants