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 callback prop for tab #898

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

suffle
Copy link

@suffle suffle commented Mar 20, 2021

This PR adds a callback prop that is called, when the tab key is pressed. This allows developers to add their own autocomplete feature

@Sebobo
Copy link

Sebobo commented Mar 22, 2021

Very cool, will test it :)

It prevents the default tabbing in the browser correct?

@suffle
Copy link
Author

suffle commented Mar 22, 2021

Very cool, will test it :)

It prevents the default tabbing in the browser correct?

That is correct, although I am open about the api. We could also call the callback with the event as its argument, then it is up to the developer to choose the behavior completely. I opted for the slightly simpler API here.

@linuswillner
Copy link
Owner

Hi, thanks for the PR! Unfortunately, I'm in a bit of a personal conundrum right now, so it will probably take me a little while to get to review this one. Don't want to give any firm timelines right now, but I promise I'll get to it eventually! Thanks for understanding 😄

@Sebobo
Copy link

Sebobo commented Mar 30, 2021

Applied it as patch and works perfectly when following the provided example 👍

Now thinking about how to provide a feedback if there are more matches or when trying to complete more than the command name.

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.

3 participants