Skip to content

input tt-hint #21

Closed Answered by niketpathak
speich asked this question in Q&A
Jun 8, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hello Simon,

A second input field (read-only) is used to display a hint within the original input field. For example, head to https://typeahead.digitalfortress.tech/, and try typing "g" in the first input box that you see. As soon as you do that, you should see 3 suggestions and within the input field, you will also see the letters old which are a bit greyed out, like a placeholder. This placeholder value comes from the second input field with class tt-hint. If you hit the Tab key, it autocompletes your input with the hint value. Using this hint is optional and you can disable it

typeahead({
    input: ...,
    source: {
      ...
    },
    hint: false,   // disables the 2nd input field
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@speich
Comment options

Answer selected by niketpathak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants