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

Add className prop to typeahead plugin #3124

Merged
merged 3 commits into from
Oct 6, 2022
Merged

Add className prop to typeahead plugin #3124

merged 3 commits into from
Oct 6, 2022

Conversation

acywatson
Copy link
Contributor

@acywatson acywatson commented Oct 6, 2022

This allows us to add styles to the underlying typeahead menu container. The menuRenderFn doesn't control this part, so it's useful to have a styling hook for it.

@vercel
Copy link

vercel bot commented Oct 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Oct 6, 2022 at 2:21PM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Oct 6, 2022 at 2:21PM (UTC)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 6, 2022
@@ -583,10 +583,10 @@ export function useBasicTypeaheadTriggerMatch(
function useMenuAnchorRef(
resolution: Resolution | null,
setResolution: (r: Resolution | null) => void,
className?: string,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change it to anchorClassName? Just want to make to make sure that people don't think this is how you style the typeahead menu itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, good call

@acywatson acywatson merged commit 00db42b into main Oct 6, 2022
@acywatson acywatson deleted the ta-class branch October 6, 2022 14:23
@acywatson acywatson restored the ta-class branch October 6, 2022 20:50
acywatson added a commit that referenced this pull request Oct 18, 2022
* add className prop to typeahead plugin

* fix

* rename
thegreatercurve pushed a commit that referenced this pull request Nov 25, 2022
* add className prop to typeahead plugin

* fix

* rename
@trueadm trueadm deleted the ta-class branch December 18, 2022 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants