Skip to content

When attempting to disable selectpicker, the menu itself still opens. #2881

@bouttellharry

Description

@bouttellharry

Hi.

So I've been using Bootstrap selectpicker for a website that I'm making at work.
When the user is under certain roles. I want these selectpickers to be disabled. Not allowing them to see any other option.
Now, despite being unable to select another option - the menu can still be opened allowing the user to still see the other users.

It works when using: $('#selectpickerName').attr('disabled', true).selectpicker('refresh') HOWEVER I then run into the bug with duplicating options, where it'll say "Selected optionSelected option".

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions