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 issue requiring collapseIcon to be clicked twice to expand/collapsed deck tree #656

Merged
merged 2 commits into from
Apr 9, 2023

Conversation

adam-jw-casey
Copy link
Contributor

Closes #655

The problem is that the initial value of collapsed was being set to the shouldBeInitiallyExpanded config value, even though these booleans should be opposite (collapsed vs. expanded).

Because the initial UI was set from shouldBeInitiallyExpanded, but the callback to the click event checked collapsed, the first click would make no visual change, but merely set the collapsed variable to be correct, and the second click would work as expected.

Technically only the change on line 846 is necessary, but the other two changes prevent the same visual confusion from occurring in the future by ensuring that that the UI and collapsed are in sync.

@adam-jw-casey adam-jw-casey requested a review from st3v3nmw as a code owner March 28, 2023 01:42
@st3v3nmw st3v3nmw merged commit 76c1707 into st3v3nmw:master Apr 9, 2023
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.

[BUG] Expanding nested decks requires two clicks the first time
2 participants