Skip to content

pn.widgets.Select: disabled_options not working with groups  #6868

Open
@ambrustorok

Description

Have a Select widget defined with groups and some of the options disabled. The disabled options can still be selected from the dropdown.

Define your widget, then select an option marked as disabled:

import panel as pn
pn.extension()

select = pn.widgets.Select(name="Select", groups={'Group 1:': ['Methane', 'Ethane', 'Propane'], 'Group 2': ['Butane', 'Pentane', 'Hexane']}, disabled_options=['Pentane', 'Hexane'])
select

image

The following code will print 'Pentane' even though it was disabled.

select.value

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't correct or isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions