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

Support for tags #16

Open
mwilc0x opened this issue Sep 9, 2015 · 1 comment
Open

Support for tags #16

mwilc0x opened this issue Sep 9, 2015 · 1 comment

Comments

@mwilc0x
Copy link

mwilc0x commented Sep 9, 2015

It would be cool if you could do multiple queries for a given input, and have queries saved as tags in the input field.

Something similar to this: https://github.com/olahol/react-tagsinput

Have you thought about adding something like this?

@ezequiel
Copy link
Owner

We actually did implement this, but instead as a higher-order component which used Typeahead. This was done to keep the reusability of Typeahead extremely high, e.g. there were cases where we didn't need tags/tokens. We didn't end up releasing it though. The basic skeleton went something like:

var TokenizedTypeahead = React.createClass({
    render: function() {
        return (
            <div>
                {this.renderTokens()}
                <Typeahead
                    onKeyDown={function(e) {
                        if (e.key === 'Tab') {
                            this.createToken()
                        }
                    }}
                />
             </div>
         );
    }
});

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

2 participants