question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expand All and Collapse All functionality on Button Click

See original GitHub issue

I am using the PnP SPFx Accordion control in my SPFx solution I want make all Accordion Expanded and Collapsible on button Click.

Below is my one accordion I am changing the state on button click but some how it does not work.

<Accordion title="Overview" defaultCollapsed={this.state.overviewAccordionCollapsed} className={styles.itemCell} > <div className={styles.itemContent}> <div className={styles.itemReponse}> </div> </div> </Accordion>

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
AJIXuMuKcommented, Feb 10, 2021

Hi @dineshtalekar777,

Currently Accordion control supports only “uncontrolled” flow: you can provide initial values, but after that the state is controlled internally.

I will mark this one as an enhancement as it makes sense to have “controlled” flow support.

EDIT: you can also look at AccessibleAccordion. It allows you to set dangerouslySetExpanded value for each accordion item.

0reactions
dineshtalekar777commented, Feb 25, 2021

@AJIXuMuK & @verdeterrejim - By mistake code pushed to master branch instead of dev branch. Please review and check at your end.

Read more comments on GitHub >

github_iconTop Results From Across the Web

collapse all and expand all functionality over a button for matrix
Solved: is there a posibility to have a button as "expand all" and "collapse all" to expand and collapse all records in a...
Read more >
Expand All & Collapse All Buttons using Bootstrap Collapse
These are half functional. The problem is that once the expand all and collapse all buttons are used the bootstrap buttons no longer...
Read more >
Expand All and Collapse All functionality on Button Click
I am using the PnP SPFx Accordion control in my SPFx solution I want make all Accordion Expanded and Collapsible on button Click....
Read more >
Expand All / Collapse All - Help+Manual
1.Click in the place where you want to insert the links, for example in the header of your topic. · 2.Select the Link...
Read more >
Collapse - Bootstrap
The collapse JavaScript plugin is used to show and hide content. Buttons or anchors are used as triggers that are mapped to specific...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found