Skip to content

Menu: Fix typeahead with leading visuals - #1914

Merged
siddharthkp merged 3 commits into
mainfrom
siddharth/fix-typeahead-with-leadingvisual
Mar 2, 2022
Merged

Menu: Fix typeahead with leading visuals#1914
siddharthkp merged 3 commits into
mainfrom
siddharth/fix-typeahead-with-leadingvisual

Conversation

@siddharthkp

@siddharthkpsiddharthkp commented Mar 1, 2022

Copy link
Copy Markdown
Member

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 mperrottiMarch 1, 2022 16:39
@changeset-bot

changeset-botBot commented Mar 1, 2022

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactPatch

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 mperrottiMarch 1, 2022 16:39
@siddharthkpsiddharthkp added bug Something isn't working react labels Mar 1, 2022
@github-actions

github-actionsBot commented Mar 1, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js64.24 KB (0%)
dist/browser.umd.js64.6 KB (0%)

Comment thread.changeset/slimy-garlics-wash.md Outdated
"@primer/react": patch
---

Menu: Fix typeahead with leading visuals

Copy link
Copy Markdown
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 mainMar 2, 2022
@siddharthkp
siddharthkp deleted the siddharth/fix-typeahead-with-leadingvisual branch March 2, 2022 12:58
@primer-cssprimer-css mentioned this pull request Mar 2, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't workingreact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@siddharthkp@colebemis