fix: change option.icon component to <component>

This commit is contained in:
hrynevych.romann 2024-02-19 11:06:55 +02:00
parent 651e6ae19c
commit b09910fb2e
3 changed files with 2 additions and 9 deletions

View File

@ -70,13 +70,6 @@ export default defineConfig({
rewrites: {
'content/(.*)': '(.*)',
},
vue: {
template: {
compilerOptions: {
isCustomElement: tag => tag === 'option.icon',
},
},
},
vite: {
css: {
postcss: {

View File

@ -108,7 +108,7 @@ const selectedValues = computed(() => new Set(props.column?.getFilterValue() as
>
<CheckIcon :class="cn('h-4 w-4')" />
</div>
<option.icon v-if="option.icon" class="mr-2 h-4 w-4 text-muted-foreground" />
<component :is="option.icon" v-if="option.icon" class="mr-2 h-4 w-4 text-muted-foreground" />
<span>{{ option.label }}</span>
<span v-if="facets?.get(option.value)" class="ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs">
{{ facets.get(option.value) }}

View File

@ -108,7 +108,7 @@ const selectedValues = computed(() => new Set(props.column?.getFilterValue() as
>
<CheckIcon :class="cn('h-4 w-4')" />
</div>
<option.icon v-if="option.icon" class="mr-2 h-4 w-4 text-muted-foreground" />
<component :is="option.icon" v-if="option.icon" class="mr-2 h-4 w-4 text-muted-foreground" />
<span>{{ option.label }}</span>
<span v-if="facets?.get(option.value)" class="ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs">
{{ facets.get(option.value) }}