1616 v-bind =" $attrs"
1717 v-model =" value"
1818 :disabled =" disabled || undefined"
19+ :multiple =" multiple || undefined"
1920 >
2021 <slot />
2122 </select >
3132<script lang="ts">
3233export const FormSelectOptionsKey = Symbol (" FormSelectOptionsKey" ) as ChildrenTrackerInjectionKey <InstanceType <typeof PfFormSelectOption >>;
3334
34- export interface Props extends OUIAProps , /* @vue-ignore */ Omit <SelectHTMLAttributes , ' value' > {
35+ export interface Props <M extends boolean = false > extends OUIAProps , /* @vue-ignore */ Omit <SelectHTMLAttributes , ' value' > {
36+ multiple? : M ;
3537 disabled? : boolean ;
3638
3739 /**
@@ -44,7 +46,7 @@ export interface Props extends OUIAProps, /* @vue-ignore */ Omit<SelectHTMLAttri
4446}
4547 </script >
4648
47- <script lang="ts" setup>
49+ <script lang="ts" setup generic = " M extends boolean = false " >
4850import styles from ' @patternfly/react-styles/css/components/FormControl/form-control' ;
4951import { provideChildrenTracker , type ChildrenTrackerInjectionKey , useChildrenTracker } from ' ../../use' ;
5052import type PfFormSelectOption from ' ./FormSelectOption.vue' ;
@@ -59,11 +61,15 @@ defineOptions({
5961 inheritAttrs: false ,
6062});
6163
62- const props = defineProps <Props >();
64+ const props = defineProps <Props < M > >();
6365const ouiaProps = useOUIAProps ({id: props .ouiaId , safe: props .ouiaSafe });
6466
6567const value = defineModel <string | string [] | null >();
6668
69+ defineEmits <{
70+ (name : ' update:modelValue' , value : M extends true ? string [] : string ): void ;
71+ }>();
72+
6773defineSlots <{
6874 default? : (props ? : Record <never , never >) => any ;
6975}>();
0 commit comments