Skip to content

Commit 83bd74a

Browse files
committed
fix: append to body positioning fix #370
1 parent 872fbac commit 83bd74a

17 files changed

+5878
-889
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ Join our [Discord channel](https://discord.gg/WhX2nG6GTQ) or [open an issue](htt
285285
| **required** | `{boolean} false` | Whether the HTML5 required attribute should be used for multiselect (using an invisible fake input). |
286286
| **infinite** | `{boolean} false` | Whether the actual option nodes should only be loaded on scroll. The `limit` option defines how many options are loaded initially and in each new batch. |
287287
| **appendToBody** | `{boolean} false` | **[Vue 3 only]** *(experimental)* Whether the dropdown list should be appended to `<body>` and positioned absolutely. |
288+
| **appendTo** | `{string} undefined` | **[Vue 3 only]** *(experimental)* Can be used instead of `appendToBody` to teleport the dropdown to a specific DOM. The value should be a query selector. |
288289
| **closeOnScroll** | `{boolean} false` | Closes the dropdown list on scrolling parent DOM / window when using `appendToBody: true`. |
289290
| **searchable** | `{boolean} false` | Whether the options should be searchable. |
290291
| **valueProp** | `{string} 'value'` | If you provide an array of objects as `options` this property should be used as the value of the option. |

build/vue2.rollup.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import vue from 'vue-prev-rollup-plugin-vue'
22
import { terser } from 'rollup-plugin-terser'
3+
import { nodeResolve } from '@rollup/plugin-node-resolve'
34

45
export default [
56
{
@@ -10,6 +11,24 @@ export default [
1011
},
1112
plugins: [
1213
vue(),
14+
nodeResolve({
15+
resolveOnly: ['@popperjs/core']
16+
}),
17+
],
18+
external: ['vue'],
19+
},
20+
{
21+
input: 'src/Multiselect.vue',
22+
output: {
23+
file: 'dist/multiselect.vue2.min.js',
24+
format: 'esm',
25+
},
26+
plugins: [
27+
vue(),
28+
nodeResolve({
29+
resolveOnly: ['@popperjs/core']
30+
}),
31+
terser()
1332
],
1433
external: ['vue'],
1534
},
@@ -25,6 +44,9 @@ export default [
2544
},
2645
plugins: [
2746
vue(),
47+
nodeResolve({
48+
resolveOnly: ['@popperjs/core']
49+
}),
2850
terser()
2951
],
3052
external: ['vue'],

build/vue3.rollup.config.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import vue from 'vue-next-rollup-plugin-vue'
2-
import alias from '@rollup/plugin-alias'
32
import { terser } from 'rollup-plugin-terser'
3+
import { nodeResolve } from '@rollup/plugin-node-resolve'
44

55
export default [
66
{
@@ -11,6 +11,24 @@ export default [
1111
},
1212
plugins: [
1313
vue(),
14+
nodeResolve({
15+
resolveOnly: ['@popperjs/core']
16+
}),
17+
],
18+
external: ['vue'],
19+
},
20+
{
21+
input: 'src/Multiselect.vue',
22+
output: {
23+
file: 'dist/multiselect.min.js',
24+
format: 'esm',
25+
},
26+
plugins: [
27+
vue(),
28+
nodeResolve({
29+
resolveOnly: ['@popperjs/core']
30+
}),
31+
terser(),
1432
],
1533
external: ['vue'],
1634
},
@@ -22,6 +40,9 @@ export default [
2240
},
2341
plugins: [
2442
vue(),
43+
nodeResolve({
44+
resolveOnly: ['@popperjs/core']
45+
}),
2546
],
2647
external: ['vue'],
2748
},
@@ -37,6 +58,9 @@ export default [
3758
},
3859
plugins: [
3960
vue(),
61+
nodeResolve({
62+
resolveOnly: ['@popperjs/core']
63+
}),
4064
terser(),
4165
],
4266
external: ['vue'],

dist/multiselect.global.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)