Skip to content

Optional search option #274

Answered by ToshY
sadeghbarati asked this question in Q&A
Nov 20, 2021 · 6 comments · 9 replies
Discussion options

You must be logged in to vote

I think you are looking for the same thing as I did, which is wanting select options without the input element. You can achieve this by explicitly setting the controlInput to null.

Example:

new TomSelect('#my-select', {
    create: false,
    highlight: true,
    closeAfterSelect: true,
    controlInput: null
});

Even though the docs state that null is the default, that doesn't seem correct. Probably needs an update there.

Replies: 6 comments 9 replies

Comment options

You must be logged in to vote
2 replies
@FritzHerbers
Comment options

@MatthewKennedy
Comment options

Answer selected by sadeghbarati
Comment options

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

Comment options

You must be logged in to vote
5 replies
@oyejorge
Comment options

@TixieSalander
Comment options

@TixieSalander
Comment options

@oyejorge
Comment options

@TixieSalander
Comment options

Comment options

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

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants