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

fix: Fixes expandAll button functionality #1312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hinakhadim
Copy link

On collapsing all the sections, the button now automatically show 'Expand All'. Similar in case of vice versa. Fixes #1311

Before:
Screenshot 2024-03-04 at 4 07 53 PM

After:
image

@arbrandes arbrandes self-requested a review March 4, 2024 16:34
@@ -78,20 +80,20 @@ const Section = ({
styling="card-lg"
title={sectionTitle}
open={open}
onToggle={() => { setOpen(!open); }}
onToggle={() => { setOpen(!open); setExpandedSections((prevObj) => ({ ...prevObj, [section.id]: !open })); }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like at this point the on event is getting verbose enough that a proper handling function would be better. There's also a lot in common with the next two changes, so it's probably going to be worth it for DRYness.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated it

@arbrandes
Copy link

Since this changes user-facing behavior, we'll need product confirmation on whether it's actually a bug or not. (If it's a bug you don't necessarily need to go through the Product Review Process. @jmakowski1123, what's your take?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand All button is not working correctly
2 participants