Skip to content

v2.4.0

Compare
Choose a tag to compare
@Grsmto Grsmto released this 17 Apr 20:11
· 1072 commits to master since this release
  • SimpleBar doesn't disable itself automatically on mobile anymore. This behaviour has been removed for multiple reasons:
    • it was confusing for new users, they were wondering why SimpleBar "wasn't working on mobile" until they read the doc
    • it was making the codebase more complex to maintain
    • this shouldn't be SimpleBar responsibility to disable itself. This can be easily done by the end user using a simple test: if (scrollbarWidth() === 0) and instantiate SimpleBar or not based on that (for this you can use the same package SimpleBar uses https://www.npmjs.com/package/scrollbarwidth)
  • Performance optimisation: some values that were heavy to read were calculated on each scroll event, they are now cached and only calculated when content size changes
  • scrollbar min-width now consistent with iOS default scrollbar

Next steps:

  • Unit tests
  • Separate module in 2: with/without mutationObservers
  • Use CSS in JS so user doesn't have to import css separately (one less step to get running!)