Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiChoice does not respect the options order #4454

Open
mzy2240 opened this issue Feb 17, 2023 · 3 comments
Open

MultiChoice does not respect the options order #4454

mzy2240 opened this issue Feb 17, 2023 · 3 comments
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@mzy2240
Copy link

mzy2240 commented Feb 17, 2023

Thanks for contacting us! Please read and follow these instructions carefully, then delete this introductory text to keep your issue easy to read. Note that the issue tracker is NOT the place for usage questions and technical assistance; post those at Discourse instead. Issues without the required information below may be closed immediately.

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)

python 3.10.15
panel 0.14.3
os windows
browser chrome

Description of expected behavior and the observed behavior

The items in the dropdown menu of multichoice component should respect the order of the options provided.

Complete, minimal, self-contained example code that reproduces the issue

a = pn.widgets.MultiChoice(name="test", value=[], options=[])
a.options = [5,4,3,2,1]  # show 1,2,3,4,5 in the browser instead
a
@mzy2240
Copy link
Author

mzy2240 commented Feb 17, 2023

Seems it is a universal issue for all the select type widgets.

@mattpap
Copy link
Collaborator

mattpap commented Feb 21, 2023

This was fixed in bokeh 3.0, so will be fixed in panel 1.0.

multi_choice = MultiChoice(options=["b", "c", "a", "_", "%", "9", "1", "2", "0"], placeholder="Choose your option ...")

image

@philippjfr philippjfr added this to the v1.0.0 milestone Feb 21, 2023
@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Feb 21, 2023
@tupui
Copy link
Contributor

tupui commented Oct 14, 2023

The options ordering is respected, but not the values. Using the bokeh component the order is respected, but not with panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

4 participants