Skip to content

Calling updates, allows not to set a new stickyBitStickyOffset value #78

@patric-eberle

Description

@patric-eberle

Describe the bug
When calling this.stickybitInstance.update({ stickyBitStickyOffset: <my-new-value> }), the top spacing of the sticky element is not adjusted. It always seems to use the initial value, even though, the prop is updated on the instance.

To Reproduce

const stickybitsInstancetoBeUpdated = stickybits("selector");
stickybitsInstancetoBeUpdated.update({ stickyBitStickyOffset: 20 });

Expected behavior
The sticky element uses the newly defined stickyBitStickyOffset as top value.

Screenshots

Desktop (please complete the following information):

  • OS: macOS 10.15
  • Browser: Chrome
  • Version: 83

Additional context
Stickybits: 3.7.7

I think the following ticket on the old repository documents the same issue, even if I was not able to call the recalculation from outside myself: dollarshaveclub#663

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions