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

X2-8421 | fix: call drawer.onClose when drawer is closed #299

Closed
wants to merge 2 commits into from

Conversation

VitalyDevico
Copy link
Contributor

No description provided.

@@ -60,18 +60,14 @@ export const Sidebar = ({
const hideRightDrawer = rightDrawer?.count <= 0 || !rightDrawer;

const handleOnClose = (direction, closeDrawer) => {
if (direction === "left") {
if (closeDrawer) {
if (closeDrawer) {
Copy link
Contributor Author

@VitalyDevico VitalyDevico Jan 8, 2024

Choose a reason for hiding this comment

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

call the .onClose method only on actual drawer close (e.g. avoid calling when click inside filter popover which cause unexpected closes when filtering), also refactored if clauses according to the linter to avoid lonely if inside else block

@@ -53,25 +57,25 @@ export const Sidebar = ({
setIsLeftDrawerOpen(false);
}

if (isRightDrawerOpen) {
rightDrawer.onClose?.();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

handle case when drawer closed via counter toggle

@VitalyDevico
Copy link
Contributor Author

Closing this one since all notification-related fixes will be handled in the same PR due to overlapping code

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.

2 participants