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

Updating topOffset #321

Open
2 of 3 tasks
dgoenka opened this issue Jan 24, 2022 · 0 comments
Open
2 of 3 tasks

Updating topOffset #321

dgoenka opened this issue Jan 24, 2022 · 0 comments

Comments

@dgoenka
Copy link

dgoenka commented Jan 24, 2022

I'm submitting a ...

  • bug report or may be
  • feature request
  • support request

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

<Sticky topOffset={<some dynamic value such as ReduxSlice.height>||<some hard coded value>}>
....
</Sticky>

[Bug Demo]( INSERT THE URL OF YOUR BUG DEMO HERE )

What is the current behavior?

the topOffset argument only takes the initial value...

What is the expected or desired behavior?

the topOffset argument should update as the props change

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

I am not aware of the height of the component above my component. Rather, I would like to keep it dynamic.

What is your environment?

  • Version: Latest
  • Browser: Chrome based

Is there anything else I should know?

Don't think so. I am using a ResizeObserver to get the dimensions of the component, so there is a small delay before that can happen. It is not available initially

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