Loading src/components/Select/Select.stories.ts +1 −0 Original line number Diff line number Diff line Loading @@ -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' }, Loading src/components/Select/Select.vue +6 −1 Original line number Diff line number Diff line <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'; Loading Loading @@ -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> Loading Loading
src/components/Select/Select.stories.ts +1 −0 Original line number Diff line number Diff line Loading @@ -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' }, Loading
src/components/Select/Select.vue +6 −1 Original line number Diff line number Diff line <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'; Loading Loading @@ -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> Loading