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

Tokenizer results are always on top #218

Open
eeiswerth opened this issue Sep 13, 2016 · 0 comments
Open

Tokenizer results are always on top #218

eeiswerth opened this issue Sep 13, 2016 · 0 comments

Comments

@eeiswerth
Copy link

The way in which I laid out my page required that I had tokenizer results on the bottom of the input, rather than the top. The tokenizer doesn't support this natively, but you can use a trick like this to get around it and force the results to the bottom. It's not pretty, but it gets the job done.

<Tokenizer
    ref={(t) => {
        if (t) {
            var n = ReactDOM.findDOMNode(t);
            var selections = $(n).find('.typeahead-token');
            if (selections.length === 0) {
                // No selections. Nothing to do.
                return;
            }
            var tokens = $(n).find('.typeahead-token').detach();
            var input = $(n).find('.typeahead');
            tokens.insertAfter(input);
        }
    }}
/>
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