Skip to content

Commit

Permalink
fix(Select): move types from template
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed May 4, 2023
1 parent 626409e commit fa05653
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/components/forms/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:label="option[textAttribute]"
>
<option
v-for="(childOption, index2) in (option.children as any[])"
v-for="(childOption, index2) in option.children"
:key="`${childOption[valueAttribute]}-${index}-${index2}`"
:value="childOption[valueAttribute]"
:selected="childOption[valueAttribute] === normalizedValue"
Expand Down Expand Up @@ -48,7 +48,7 @@

<script lang="ts">
import { computed, defineComponent } from 'vue'
import type { PropType } from 'vue'
import type { PropType, ComputedRef } from 'vue'
import { get } from 'lodash-es'
import { defu } from 'defu'
import Icon from '../elements/Icon.vue'
Expand Down Expand Up @@ -158,7 +158,7 @@ export default defineComponent({
return props.options.map(option => normalizeOption(option))
})
const normalizedOptionsWithPlaceholder = computed(() => {
const normalizedOptionsWithPlaceholder: ComputedRef<{ disabled?: boolean, children: { disabled?: boolean }[] }[]> = computed(() => {
if (!props.placeholder) {
return normalizedOptions.value
}
Expand Down

0 comments on commit fa05653

Please sign in to comment.