Skip to content

Commit ec97302

Browse files
committed
VfSmartSelect: remove options container from body on unmount
1 parent 0baf334 commit ec97302

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@signal24/vue-foundation",
33
"type": "module",
4-
"version": "4.25.5",
4+
"version": "4.25.6",
55
"description": "Common components, directives, and helpers for Vue 3 apps",
66
"module": "./dist/vue-foundation.es.js",
77
"exports": {

src/components/vf-smart-select.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
<script lang="ts" setup generic="T, V = T">
5353
import { debounce, groupBy, isEqual, uniq } from 'lodash';
54-
import { computed, onMounted, ref, watch } from 'vue';
54+
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
5555
5656
import { isNotNullOrUndefined } from '@/helpers';
5757
@@ -335,6 +335,10 @@ onMounted(async () => {
335335
}
336336
});
337337
338+
onBeforeUnmount(() => {
339+
optionsContainer.value?.remove();
340+
});
341+
338342
async function loadRemoteOptions() {
339343
await reloadOptions();
340344
if (loadedOptions.value) emit('optionsLoaded', loadedOptions.value);

0 commit comments

Comments
 (0)