Hide selection programatically

33 views
Skip to first unread message

wschr...@gmail.com

unread,
Jul 28, 2015, 4:01:10 PM7/28/15
to select2
Is it possible to hide the selection (the topmost element) programatically so that you only see the options?

Kevin Brown

unread,
Jul 31, 2015, 7:10:51 PM7/31/15
to select2
It's not exactly clear what you are looking for. If you're looking to never display the selection, you can hide it via CSS (using the `.select2-selection__rendered` or `.select2-selection__rendered__choice` selector) or return `null` from a custom `templateSelection` method.

On Tue, Jul 28, 2015 at 4:01 PM <wschr...@gmail.com> wrote:
Is it possible to hide the selection (the topmost element) programatically so that you only see the options?

--
You received this message because you are subscribed to the Google Groups "select2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to select2+u...@googlegroups.com.
To post to this group, send email to sel...@googlegroups.com.
Visit this group at http://groups.google.com/group/select2.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages