You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Section component collapseProps.defaultIsOpen does the opposite of what is expected, i.e. when defaultIsOpen={true} the collapse is closed, and when defaultIsOpen={false} the collapse is open.
Expected behavior
When defaultIsOpen={true} the collapse should initially be open.
Possible solution
The component defines an useState variable called isCollapsed which is initialized with the defaultIsOpen value. This value should be negated when initially provided to useState.
Environment
Code Sandbox
Link to a minimal repro (fork this code sandbox): https://codesandbox.io/p/sandbox/objective-easley-stwn3x
Steps to reproduce
Actual behavior
The
Section
componentcollapseProps.defaultIsOpen
does the opposite of what is expected, i.e. whendefaultIsOpen={true}
the collapse is closed, and whendefaultIsOpen={false}
the collapse is open.Expected behavior
When
defaultIsOpen={true}
the collapse should initially be open.Possible solution
The component defines an
useState
variable calledisCollapsed
which is initialized with thedefaultIsOpen
value. This value should be negated when initially provided touseState
.https://github.com/palantir/blueprint/blob/develop/packages/core/src/components/section/section.tsx#L112C67-L112C68
The text was updated successfully, but these errors were encountered: