We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c141b32 commit 48f2a61Copy full SHA for 48f2a61
src/Sticky.jsx
@@ -304,6 +304,13 @@ class Sticky extends Component {
304
) {
305
this.props.onStateChange({ status: this.state.status });
306
}
307
+
308
+ // check if we are up-to-date, is triggered in case of scroll restoration
309
+ if (this.props.top !== prevState.top) {
310
+ this.updateInitialDimension();
311
+ this.update();
312
+ }
313
314
const arePropsChanged = !shallowEqual(this.props, prevProps);
315
if (arePropsChanged) {
316
// if the props for enabling are toggled, then trigger the update or reset depending on the current props
0 commit comments