-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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(NavbarOffcanvas): fix rendering of nav items when expand is used #6310
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, left one nitpick/question
ref={ref} | ||
show={!!context?.expanded} | ||
bsPrefix={bsPrefix} | ||
backdrop={backdrop} | ||
backdropClassName={backdropClassName} | ||
keyboard={keyboard} | ||
scroll={scroll} | ||
placement={placement} | ||
autoFocus={autoFocus} | ||
enforceFocus={enforceFocus} | ||
restoreFocus={restoreFocus} | ||
restoreFocusOptions={restoreFocusOptions} | ||
onShow={onShow} | ||
onHide={onHide} | ||
onEscapeKeyDown={onEscapeKeyDown} | ||
onEnter={onEnter} | ||
onEntering={onEntering} | ||
onEntered={onEntered} | ||
onExit={onExit} | ||
onExiting={onExiting} | ||
onExited={onExited} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change this from {...props}
? Those props are being forwarded anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i mean most of these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol yeah it's a bit ugly. I pulled it out because I also spread the remainder of the props into the div above for the navbar expand case.
fec2c67
to
75788fe
Compare
Fixes #6309
When the navbar hits the expand breakpoint, it will render the children into a div instead of using the Offcanvas component to do it. We don't need the functionality when the nav items are shown this way anyway. One thing that needs to be done is to add a default breakpoint size for xxl in @restart/hooks.
I think this approach should be ok? Will add tests later after review.