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

Accordion's active does not work correctly #2006

Closed
rafgonsi opened this issue Feb 25, 2021 · 0 comments · Fixed by #2009
Closed

Accordion's active does not work correctly #2006

rafgonsi opened this issue Feb 25, 2021 · 0 comments · Fixed by #2009
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@rafgonsi
Copy link

ALL software version info

Python 3.7.6, panel==0.10.3

Description of expected behavior and the observed behavior

  1. I would expect accordion.active to return list of active cards. Now it returns an empty list even if some card is open.
  2. Also setting values to accordion.active I would expect to open only selected cards. Now it opens selected cards, but does not close the ones that were not selected.

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

# based on https://panel.holoviz.org/reference/layouts/Accordion.html
import panel as pn
pn.extension()

from bokeh.plotting import figure

p1 = figure(width=300, height=80, name='Scatter', margin=5)
p1.scatter([0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 2, 1, 0])

p2 = figure(width=300, height=80, name='Line', margin=5)
p2.line([0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 2, 1, 0])

accordion = pn.Accordion(p1, p2)
accordion
accordion.active
accordion.active = [0]

Screenshots or screencasts of the bug in action

Peek 2021-02-25 12-42

@rafgonsi rafgonsi changed the title Accordion's active Accordion's active does not work correctly Feb 25, 2021
@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Feb 25, 2021
@philippjfr philippjfr added this to the v0.11.0 milestone Feb 25, 2021
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

Successfully merging a pull request may close this issue.

2 participants