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

Added support to disable suggestion selection #719

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jack-lewin
Copy link

I've picked up #440 to try and get it merged.

This PR adds an optional disabled prop to suggestions.

If a suggestion is disabled, it...

  • has a different style (reduced opacity, default cursor)
  • is not selectable & has aria-disabled = true
  • but still appears in the list

I've also...

  • added tests for the SuggestionsOverlay component & new functionality
  • updated the examples to disable one suggestion
  • updated the README accordingly

If this lands, I'll make a separate PR to the DefinitelyTyped repo.

Feedback appreciated - cc @mastrix, @Sigrsig and @steffektif 🙏

jack-lewin and others added 3 commits November 20, 2023 13:39
If a suggestion is disabled...
- Set aria-disabled=true
- Apply style
- Don't handle onSelect

Co-authored-by: Maks <sulimmaxim@gmail.com>
Copy link

changeset-bot bot commented Nov 20, 2023

🦋 Changeset detected

Latest commit: 247672b

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

This PR includes changesets to release 1 package
Name Type
react-mentions Minor

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

Copy link

vercel bot commented Nov 20, 2023

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

Name Status Preview Comments Updated (UTC)
react-mentions ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2023 1:53pm

@jack-lewin
Copy link
Author

Hi @Sigrsig & @steffektif, sorry for the nudge - are you still maintaining this project?
If not, is there anyone else I should reach out to?

@steffektif
Copy link
Contributor

Hey sorry, already the last time you reached out I pinged some people. Currently @PreussHendrik and @crecotun are in charge. I hope they see this message and can help you out

@jack-lewin
Copy link
Author

Thanks a lot @steffektif - appreciate it 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants