-
Notifications
You must be signed in to change notification settings - Fork 388
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
No clean way to force-update Sticky #231
Comments
Ah interesting! Good point, that does seem like a viable use-case. Do you have any specific API in mind? First thought would be an additional argument passed to the |
Yeah I like the |
I want this too. For now, as a workaround you can do |
really want it to be fixed asap, can't even wait for 6.1 |
Good thing there's a workaround then @marklai1998! I haven't had much time to dedicate to developing |
@vcarl The scroll event workaround suggested by @callumlocke is fantastic. Perhaps that could be included in the README as a quick fix for cases where we need to trigger a sticky check? |
Good idea! I'm happy to merge a PR if you want to submit one @Simon-Tang :) |
Adds workaround mentioned in captivationsoftware#231 for triggering layout check
I've got a use case wherein I have a
<StickyContainer/>
on the right-hand side of the page that expands to the left when the user clicks a button, remaining sticky the whole time. Like this! Since this action doesn't fire any of the events that<StickyContainer/>
listens for, its left hand side moves to the left but the child<Sticky/>
and its contents don't until I scroll the page a tick. If I manually trigger an e.g. scroll event on the element I get fromcontext.getParent()
, it updates properly, but it feels hacky. I'd like a param passed from<Sticky/>
to its child render function that I can invoke in order for the layout to update.The text was updated successfully, but these errors were encountered: