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

Project is poorly documented / needs a re-documentation #254

Open
stavlocker opened this issue Aug 8, 2018 · 1 comment
Open

Project is poorly documented / needs a re-documentation #254

stavlocker opened this issue Aug 8, 2018 · 1 comment

Comments

@stavlocker
Copy link

stavlocker commented Aug 8, 2018

I'm editing this once again for another problem that also has to do with the documentation.

Hi. I love this project, it's helped me a lot. But it's really underdocumented. The first thing that's not documented at all is programmatically clearing the input's value. It took me a lot of time to find the solution, which is the Typeahead ref

//In constructor:
this.typeaheadRef = React.createRef();
//Prop on the Typeahead component:
ref={this.typeaheadRef}
//Resetting:
this.typeaheadRef.current.setEntryText("");

Not only this feature isn't documented here, the word ref isn't mentioned once in the README.md. Once. (Ctrl + F > ref)

Another feature that's not documented that I luckily found out about is that Typeahead actually does support arrow key navigation between options, but it doesn't show - it just gives the hover class to the element in focus. That's fine as a solution, but once again it's not mentioned anywhere.

The project really needs a re-documentation or just a fixing of the documentation to include all those features that make the project even better but aren't shown anywhere.

@stavlocker stavlocker changed the title Urgent: Clearing input value Documentation of clearing input value Aug 8, 2018
@stavlocker stavlocker changed the title Documentation of clearing input value Project is poorly documented / needs a re-documentation Oct 10, 2018
@stavlocker
Copy link
Author

This issue was originally about me not knowing how to clear input value, because it's not documented. Then I luckily found out how to do that, so it was about the documentation lacking in the subject of clearing input.

Then I tried to implement my own arrow navigation after finding no results online, and then found out that there's a secret arrow key navigation with the hover class. What?

The documentation really needs a revamp to include all those "secret" features, with examples and categories. These two issues are probably not the only ones that aren't documented.

stavlocker added a commit to stavlocker/react-typeahead that referenced this issue Oct 10, 2018
Updated documentation to "fix" fmoo#254 - added documentation of arrow key navigation and `setEntryText`.
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

No branches or pull requests

1 participant