v5
Grsmto
released this
16 Sep 19:08
·
511 commits
to master
since this release
⚠️ Breaking changes!
simplebar-core
- SimpleBar does not mutate the attached DOM node anymore. This means that if you want to retrieve SimpleBar instance on an element that has been instantiated with
[data-simplebar]
DOM attribute, you will need to do the following:
SimpleBar.instances.get(document.querySelector('[data-simplebar]']))
more infos: #326
simplebar-react
- You can now pass options "the React way" instead of using data attributes:
data-simplebar-auto-hide="false"
—>autoHide="false"
The data attribute way is now deprecated as it was coming at the cost of a complex function to retrieve the options. It will be removed in future releases.
⚙️ Features
simplebar-core
- Cache the scrollbar width for the life of the application (#373) Thanks @abettadapur !
- Bring back MutationObserver to fix an issue where resizeObserver couldn't detect horizontal overflow (#377)
- Support for click on track (#178)
simplebar-react
- Support a new render-prop pattern so you can get access to refs to DOM nodes. This means compatibility with libraries like React-window or React-select v2+!
- Lighter/faster as it's now using
simplebar-core
and does not comes with a global mutation observer anymore. - TypeScript definitions (#346) Thanks @chrisparton1991 !