Skip to content

Commit 8092917

Browse files
authored
Merge pull request #1927 from shentao/release(3.5)
release(3.5.0): Version Release
2 parents 80dd52a + b00724e commit 8092917

24 files changed

+155
-36
lines changed

dist/vue-multiselect.common.js

Lines changed: 18 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-multiselect.common.js.map

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

dist/vue-multiselect.esm.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,7 @@ var pointerMixin = {
889889
}
890890

891891
if (this.filteredOptions.length > 0 &&
892+
this.filteredOptions[this.pointer] &&
892893
this.filteredOptions[this.pointer].$isLabel &&
893894
!this.groupSelect
894895
) {
@@ -1075,14 +1076,23 @@ var script = {
10751076
default: false
10761077
},
10771078
/**
1078-
* Uses Vue Teleport's feature. Teleports the open dropdown to the bottom of the body element
1079+
* Uses Vue Teleport's feature. Teleports the open dropdown to the bottom of the teleportTarget element
10791080
* @default false
10801081
* @type {Boolean}
10811082
*/
10821083
useTeleport: {
10831084
type: Boolean,
10841085
default: false
10851086
},
1087+
/**
1088+
* Target selector for teleporting the dropdown element
1089+
* @default 'body'
1090+
* @type {String|Object}
1091+
*/
1092+
teleportTarget: {
1093+
type: [String, Object],
1094+
default: 'body'
1095+
},
10861096
/**
10871097
* Classes to apply to the `multiselect__content-wrapper` element. This element is a teleport element (when enabled), so can be used to specifically target
10881098
* the teleported element
@@ -1355,7 +1365,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
13551365
: createCommentVNode("v-if", true)
13561366
], 512 /* NEED_PATCH */),
13571367
(openBlock(), createBlock(Teleport, {
1358-
to: "body",
1368+
to: $props.teleportTarget,
13591369
disabled: !$props.useTeleport
13601370
}, [
13611371
createVNode(Transition, { name: "multiselect" }, {
@@ -1452,7 +1462,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
14521462
])
14531463
])
14541464
], 512 /* NEED_PATCH */), [
1455-
[vShow, $props.showNoOptions && ((_ctx.options.length === 0 || ($options.hasOptionGroup === true && _ctx.filteredOptions.length === 0)) && !_ctx.search && !$props.loading)]
1465+
[vShow, $props.showNoOptions && _ctx.filteredOptions.length === 0 && !_ctx.search && !$props.loading]
14561466
]),
14571467
renderSlot(_ctx.$slots, "afterList")
14581468
], 12 /* STYLE, PROPS */, _hoisted_9)
@@ -1461,7 +1471,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
14611471
]),
14621472
_: 3 /* FORWARDED */
14631473
})
1464-
], 8 /* PROPS */, ["disabled"]))
1474+
], 8 /* PROPS */, ["to", "disabled"]))
14651475
], 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_1))
14661476
}
14671477

dist/vue-multiselect.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@ var VueMultiselect = (function (exports, vue) {
890890
}
891891

892892
if (this.filteredOptions.length > 0 &&
893+
this.filteredOptions[this.pointer] &&
893894
this.filteredOptions[this.pointer].$isLabel &&
894895
!this.groupSelect
895896
) {
@@ -1076,14 +1077,23 @@ var VueMultiselect = (function (exports, vue) {
10761077
default: false
10771078
},
10781079
/**
1079-
* Uses Vue Teleport's feature. Teleports the open dropdown to the bottom of the body element
1080+
* Uses Vue Teleport's feature. Teleports the open dropdown to the bottom of the teleportTarget element
10801081
* @default false
10811082
* @type {Boolean}
10821083
*/
10831084
useTeleport: {
10841085
type: Boolean,
10851086
default: false
10861087
},
1088+
/**
1089+
* Target selector for teleporting the dropdown element
1090+
* @default 'body'
1091+
* @type {String|Object}
1092+
*/
1093+
teleportTarget: {
1094+
type: [String, Object],
1095+
default: 'body'
1096+
},
10871097
/**
10881098
* Classes to apply to the `multiselect__content-wrapper` element. This element is a teleport element (when enabled), so can be used to specifically target
10891099
* the teleported element
@@ -1356,7 +1366,7 @@ var VueMultiselect = (function (exports, vue) {
13561366
: vue.createCommentVNode("v-if", true)
13571367
], 512 /* NEED_PATCH */),
13581368
(vue.openBlock(), vue.createBlock(vue.Teleport, {
1359-
to: "body",
1369+
to: $props.teleportTarget,
13601370
disabled: !$props.useTeleport
13611371
}, [
13621372
vue.createVNode(vue.Transition, { name: "multiselect" }, {
@@ -1453,7 +1463,7 @@ var VueMultiselect = (function (exports, vue) {
14531463
])
14541464
])
14551465
], 512 /* NEED_PATCH */), [
1456-
[vue.vShow, $props.showNoOptions && ((_ctx.options.length === 0 || ($options.hasOptionGroup === true && _ctx.filteredOptions.length === 0)) && !_ctx.search && !$props.loading)]
1466+
[vue.vShow, $props.showNoOptions && _ctx.filteredOptions.length === 0 && !_ctx.search && !$props.loading]
14571467
]),
14581468
vue.renderSlot(_ctx.$slots, "afterList")
14591469
], 12 /* STYLE, PROPS */, _hoisted_9)
@@ -1462,7 +1472,7 @@ var VueMultiselect = (function (exports, vue) {
14621472
]),
14631473
_: 3 /* FORWARDED */
14641474
})
1465-
], 8 /* PROPS */, ["disabled"]))
1475+
], 8 /* PROPS */, ["to", "disabled"]))
14661476
], 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_1))
14671477
}
14681478

dist/vue-multiselect.ssr.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ var pointerMixin = {
893893
}
894894

895895
if (this.filteredOptions.length > 0 &&
896+
this.filteredOptions[this.pointer] &&
896897
this.filteredOptions[this.pointer].$isLabel &&
897898
!this.groupSelect
898899
) {
@@ -1079,14 +1080,23 @@ var script = {
10791080
default: false
10801081
},
10811082
/**
1082-
* Uses Vue Teleport's feature. Teleports the open dropdown to the bottom of the body element
1083+
* Uses Vue Teleport's feature. Teleports the open dropdown to the bottom of the teleportTarget element
10831084
* @default false
10841085
* @type {Boolean}
10851086
*/
10861087
useTeleport: {
10871088
type: Boolean,
10881089
default: false
10891090
},
1091+
/**
1092+
* Target selector for teleporting the dropdown element
1093+
* @default 'body'
1094+
* @type {String|Object}
1095+
*/
1096+
teleportTarget: {
1097+
type: [String, Object],
1098+
default: 'body'
1099+
},
10901100
/**
10911101
* Classes to apply to the `multiselect__content-wrapper` element. This element is a teleport element (when enabled), so can be used to specifically target
10921102
* the teleported element
@@ -1359,7 +1369,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
13591369
: vue.createCommentVNode("v-if", true)
13601370
], 512 /* NEED_PATCH */),
13611371
(vue.openBlock(), vue.createBlock(vue.Teleport, {
1362-
to: "body",
1372+
to: $props.teleportTarget,
13631373
disabled: !$props.useTeleport
13641374
}, [
13651375
vue.createVNode(vue.Transition, { name: "multiselect" }, {
@@ -1456,7 +1466,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
14561466
])
14571467
])
14581468
], 512 /* NEED_PATCH */), [
1459-
[vue.vShow, $props.showNoOptions && ((_ctx.options.length === 0 || ($options.hasOptionGroup === true && _ctx.filteredOptions.length === 0)) && !_ctx.search && !$props.loading)]
1469+
[vue.vShow, $props.showNoOptions && _ctx.filteredOptions.length === 0 && !_ctx.search && !$props.loading]
14601470
]),
14611471
vue.renderSlot(_ctx.$slots, "afterList")
14621472
], 12 /* STYLE, PROPS */, _hoisted_9)
@@ -1465,7 +1475,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
14651475
]),
14661476
_: 3 /* FORWARDED */
14671477
})
1468-
], 8 /* PROPS */, ["disabled"]))
1478+
], 8 /* PROPS */, ["to", "disabled"]))
14691479
], 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_1))
14701480
}
14711481

dist/vue-multiselect.umd.js

Lines changed: 18 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-multiselect.umd.js.map

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

dist/vue-multiselect.umd.min.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.

dist/vue-multiselect.umd.min.js.map

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)