You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(PinInput)!: add support for numeric type (#1878)
* feat(pin-input): support number[] as possible value
* feat(pin-input): use generic type for the type prop
* feat(pin-input): use generic type for the type prop
BREAKING: Require number[] for number type and convert the value to number.
* test(pin-input): expect numbers to be emitted for number type
* fix: set default type as text
---------
Co-authored-by: zernonia <zernonia@gmail.com>
/** The controlled checked state of the pin input. Can be binded as `v-model`. */
16
-
modelValue?:string[]|null
21
+
modelValue?:PinInputValue<Type>|null
17
22
/** The default value of the pin inputs when it is initially rendered. Use when you do not need to control its checked state. */
18
-
defaultValue?:string[]
23
+
defaultValue?:PinInputValue<Type>[]
19
24
/** The placeholder character to use for empty pin-inputs. */
20
25
placeholder?:string
21
26
/** When `true`, pin inputs will be treated as password. */
22
27
mask?:boolean
23
28
/** When `true`, mobile devices will autodetect the OTP from messages or clipboard, and enable the autocomplete field. */
24
29
otp?:boolean
25
30
/** Input type for the inputs. */
26
-
type?:'text'|'number'
31
+
type?:Type
27
32
/** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */
28
33
dir?:Direction
29
34
/** When `true`, prevents the user from interacting with the pin input */
0 commit comments