Comments (4)
Hello @YakovL,
By the examples, it seems that you are using SimpleBar Vue instead of this package (Vue SimpleBar).
If you want to use this package you can pass options like this:
<template>
<vue-simplebar :options="{autoHide: false, direction: 'rtl'}">
<p> Your scrollable content goes here. </p>
</vue-simplebar>
</template>
<script>
import { VueSimplebar } from 'vue-simplebar'
export default {
components: { VueSimplebar }
}
</script>
<style src="vue-simplebar/dist/vue-simplebar.css"/>
from vue-simplebar.
ah, right, that was confusing. Thanks! I've "re"nstalled Vue SimpleBar instead of SimpleBar Vue, autoHide
works this way indeed, but direction
doesn't work for some reason. Any ideas?
Also, I've noticed a couple of issues to be reported separately: Unable to preventDefault inside passive event listener invocation.
errors in console on each ~mousedown on scrollbar and also unlike SimpleBar Vue, Vue SimpleBar doesn't seem to get updated with vue-cli-service serve
when I change options in template, I have to manually reload the page.
from vue-simplebar.
After some digging in the official package found out the direction
option seems to be applied only if the data-simplebar-direction
attribute is present in the HTML. I guess for that option, in particular, you'll need to declare specifically on the element as data
attribute 🤷♂️.
// JS
<vue-simplebar id="scroller" data-simplebar-direction="rtl" :options="{autoHide: false}">
<p> Your scrollable content goes here. </p>
</vue-simplebar>
// CSS
#scroller {
direction: rtl;
}
You can try and open an issue on the official repository and state that direction option
has no effect if passed in the initialization object, I believe there's not much I can do about that on my side.
About the other issues:
-
Unable to preventDefault inside passive event listener invocation.
I can't seem to reproduce this. Which browser are you using, can you provide a simple fiddle? -
Hot Reload with vue-cli-service serve
Haven't used it, will try to take a look at it this weekend and see what happens
from vue-simplebar.
Right, thanks. Will be cool if you add this quirk about options into readme
Regarding "Unable to preventDefault inside passive event listener invocation": I get this in both Vivaldi (Chromium-based) and Chrome; regarding a fiddle.. stackblitz.com doesn't seem to support Vue, are you aware of a simple way to create a service with the necessary bits (Vue, Vue SimpleBar, dependencies?)
from vue-simplebar.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-simplebar.