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

Show suggestions on focus with minLength=0 does not work #237

Open
tqdo opened this issue Jan 30, 2021 · 0 comments
Open

Show suggestions on focus with minLength=0 does not work #237

tqdo opened this issue Jan 30, 2021 · 0 comments

Comments

@tqdo
Copy link

tqdo commented Jan 30, 2021

I am trying to show the first 15 suggestions when the search box is focused. Below is my code and it does not work. Really appreciate any help

let searchMaster = $('#searchBoxMaster')
        searchMaster.typeahead({
                hint: true,
                highlight: true,
                minLength: 0,
            },
            {
                name: 'Indicators',
                source: suggestionName,
                limit: 15,
                displayKey: 'value',
                templates: {
                    suggestion: function (data) {
                        return '<div class="line_master_search"><div class="inlinee1">' + data.row + '</div>&nbsp; - &nbsp;<div class="inlinee2">'
                            + data.name + '</div></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

1 participant