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

The sticky header overflows the sticky container when scroll horizontally. #334

Open
1 of 3 tasks
mrdulin opened this issue Jan 22, 2024 · 1 comment
Open
1 of 3 tasks

Comments

@mrdulin
Copy link

mrdulin commented Jan 22, 2024

I'm submitting a ...

  • bug report
  • feature request
  • support request

If you're reporting a bug, please provide a minimal demonstration of the problem

Bug Demo

What is the current behavior?

The sticky header overflows the sticky container

image

What is the expected or desired behavior?

The sticky header should stay in the sticky container.

Why do you want this? What use case do you have?

I want to scroll horizontally

What is your environment?

  • Version: react-sticky 6.0.3
  • Browser: Edge 120.0.2210.133

Is there anything else I should know?

No.

@mrdulin
Copy link
Author

mrdulin commented Jan 22, 2024

A solution is to use clip-path: inset(0 0 0 0) on the scroll container element.

.wrapper {
  position: relative;
  height: 300px;
  width: 600px;
  overflow: auto;
  border: 1px solid #ddd;
  clip-path: inset(0 0 0 0);
}

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

No branches or pull requests

1 participant