Skip to content
Snippets Groups Projects
Commit 284855c1 authored by Дмитрий Малюгин's avatar Дмитрий Малюгин :clock4:
Browse files

fix: 'Select'

parent 67ccc01f
No related branches found
No related tags found
1 merge request!5Update Table
......@@ -19,6 +19,7 @@ const meta: Meta = {
filtered: { control: 'boolean' },
disabled: { control: 'boolean' },
noHighlight: { control: 'boolean' },
selected: { control: 'text' },
fontSize: { control: 'text' },
placeholder: { control: 'text' },
name: { control: 'text' },
......
<script setup lang="ts">
import type { ISelectProps } from '@interfaces/componentsProps';
import { computed, ref } from 'vue';
import { computed, ref, watch } from 'vue';
import { convertThemeToColor, convertThemeToTextColor } from '@helpers/common';
import { iconsSet } from '@/common/constants/icons';
import type { TThemeColor } from '@interfaces/common';
......@@ -55,6 +55,11 @@ const calcOptionColor = (color: TThemeColor | undefined, darknessColor: string |
document.querySelector('body')!.addEventListener('pointerup', (e: MouseEvent) => {
if (isOpen.value && e.button === 0) isOpen.value = false;
});
const selectedProp = computed(() => props.selected);
watch(selectedProp, () => (selected.value = selectedProp.value), {
immediate: true,
});
</script>
<template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment