Skip to content

Commit c574096

Browse files
✨ NEW: updateHistoryStack prop
1 parent 9fb07aa commit c574096

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ html {
140140
| `useDataAttribute` | `string` | To customize the string after `data-` | `"to-scrollspy-id"` | no |
141141
| `activeClass` | `string` | To customize the `class` added when the `Element` in view | `"active-scroll-spy"` | no |
142142
| `useBoxMethod` | `boolean` | Set to `false` if you want your spy to be active only if more than `50%` of that `div` is in the viewport | `true` | no |
143+
| `updateHistoryStack` | `boolean` | Set to `false` to disable the URL getting automatically updated when scrolling | `true` | no
143144

144145
##
145146

dist/ScrollSpy/ScrollSpy.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ interface ScrollSpyProps {
1010
useDataAttribute?: string;
1111
activeClass?: string;
1212
useBoxMethod?: boolean;
13+
updateHistoryStack?: boolean;
1314
}
14-
declare const ScrollSpy: ({ children, navContainerRef, parentScrollContainerRef, scrollThrottle, onUpdateCallback, offsetTop, offsetBottom, useDataAttribute, activeClass, useBoxMethod, }: ScrollSpyProps) => JSX.Element;
15+
declare const ScrollSpy: ({ children, navContainerRef, parentScrollContainerRef, scrollThrottle, onUpdateCallback, offsetTop, offsetBottom, useDataAttribute, activeClass, useBoxMethod, updateHistoryStack, }: ScrollSpyProps) => JSX.Element;
1516
export default ScrollSpy;

dist/index.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)