Autodesk / Autodesk/hig

side-nav - onMinimize and onClickCollapseButton events not triggered properly

Open
#1,147 1 comment 0 reactions 0 assignees View on GitHub
bug community feature request
Dominant language
JavaScript
Stars
193
Forks
112
PR merge metrics
No merged PRs in 30d

Description

Unless I'm doing something wrong, it seems like the `onMinimize` and `onClickCollapseButton` event handlers (both from `SideNav` and `SideNav.Module`) are being triggered when the component is mounted instead of when the event is actually triggered.

You can see this behavior on the following sandbox, the console shows all the `console.log`s on mount and the alert as well. I thought the alert should be when the collapse button is clicked.

https://codesandbox.io/s/w74z7v5847

Thanks in advance!

Nono

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior in the linked CodeSandbox, then locate the SideNav and SideNav.Module implementations and inspect how onMinimize and onClickCollapseButton are passed or invoked. Done means the handlers remain silent on mount and fire only when the corresponding collapse interaction occurs, for both components.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.