Skip to content

Commit c0b9506

Browse files
author
issayah
committed
UseFormInput reduce complexity and add uniformity
1 parent d8f1131 commit c0b9506

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/composables/useFormInput.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import useId from './useId'
1313

1414
export const COMMON_INPUT_PROPS = {
1515
ariaInvalid: {
16-
type: [Boolean, String] as PropType<boolean | 'false' | 'true' | 'grammar' | 'spelling'>,
16+
type: [Boolean, String] as PropType<'grammar' | 'spelling' | boolean | undefined>,
1717
default: false,
1818
},
1919
autocomplete: {type: String, required: false},
@@ -94,12 +94,6 @@ function useFormInput(props: Readonly<InputProps>, emit: InputEmitType) {
9494
}
9595
return props.ariaInvalid
9696
}
97-
if (props.ariaInvalid === 'true') {
98-
return true
99-
}
100-
if (props.ariaInvalid === 'false') {
101-
return undefined
102-
}
10397
return props.ariaInvalid
10498
})
10599

0 commit comments

Comments
 (0)