simplebar-react: recalculate() - Method Undefined on Ref Object #704
Open
Description
Describe the bug
I am encountering an issue with simplebar-react
where the recalculate()
method does not seem to exist on the ref object as suggested by some parts of the documentation or community examples. This is causing difficulties in managing dynamic content sizes in React.
To Reproduce
Steps to reproduce the behavior:
- Go to my CodeSandbox example: EXAMPLE OF ISSUE HERE.
- Observe the console output after component mounts.
- Notice that the
recalculate()
method is undefined on theSimpleBar
ref.
Expected behaviour
I expect to be able to call ref.current.recalculate()
to adjust the scrollbar when the content size changes dynamically.
Actual behaviour*
The ref.current.recalculate()
is undefined, and thus I cannot invoke this method to manage dynamic content changes.
Reproducible example
See codesandbox link above.
Additional context
N/A
Your environment
Software | Version(s) |
---|---|
SimpleBar | Latest |
Browser | Any |
npm/Yarn | n/a |
Operating System | Any |
Metadata
Assignees
Labels
No labels