mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-16 09:10:33 +03:00
WIP: Popper integration
- adds dropdown events: opening, opened, closing, closed
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<v-select :options="books" :position="position" label="title"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import books from '../data/books';
|
||||
import Popper from 'popper.js';
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
books,
|
||||
}),
|
||||
methods: {
|
||||
position ({$refs}) {
|
||||
if ($refs.dropdownMenu) {
|
||||
new Popper($refs.toggle, $refs.dropdownMenu, {
|
||||
placement: 'top',
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -36,3 +36,6 @@ If you want to get a quick sense of what vue-select can do, check out
|
||||
- **[CodePen Template](http://codepen.io/sagalbot/pen/NpwrQO)**
|
||||
- **[GitHub](https://github.com/sagalbot/vue-select)**
|
||||
- **[Projects](https://github.com/sagalbot/vue-select/projects)**
|
||||
|
||||
|
||||
<Popper />
|
||||
|
||||
Reference in New Issue
Block a user