Skip to content

Commit cfa4cad

Browse files
author
issayah
committed
Two component fixes
1 parent 7f804d3 commit cfa4cad

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/components/BFormCheckbox/BFormCheckbox.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ interface BFormCheckboxProps {
5252
required?: boolean
5353
size?: InputSize
5454
state?: boolean
55-
uncheckedValue?: Array<unknown> | Set<unknown> | boolean
56-
value?: Array<unknown> | Set<unknown> | boolean
55+
uncheckedValue?:
56+
| Array<unknown>
57+
| Set<unknown>
58+
| boolean
59+
| string
60+
| Record<string, unknown>
61+
| number
62+
value?: Array<unknown> | Set<unknown> | boolean | string | Record<string, unknown> | number
5763
modelValue?: Array<unknown> | Set<unknown> | boolean
5864
}
5965

src/components/BFormTags/BFormTags.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ interface BFormTagsProps {
141141
tagPills?: boolean
142142
tagRemoveLabel?: string
143143
tagRemovedLabel?: string
144-
tagValidator?: <T>(t: T) => boolean
144+
tagValidator?: (t?: string) => boolean
145145
tagVariant?: ColorVariant
146146
}
147147
@@ -170,9 +170,9 @@ const props = withDefaults(defineProps<BFormTagsProps>(), {
170170
})
171171
172172
interface BFormTagsEmits {
173-
(e: 'update:modelValue', value: Array<unknown>): void
174-
(e: 'input', value: Array<unknown>): void
175-
(e: 'tag-state', ...args: Array<unknown>): void
173+
(e: 'update:modelValue', value: Array<string>): void
174+
(e: 'input', value: Array<string>): void
175+
(e: 'tag-state', ...args: Array<Array<string>>): void
176176
(e: 'focus', value: FocusEvent): void
177177
(e: 'focusin', value: FocusEvent): void
178178
(e: 'focusout', value: FocusEvent): void
@@ -282,7 +282,7 @@ const onInput = (e: Event | string): void => {
282282
invalidTags.value = props.tagValidator(value) ? [] : [value]
283283
duplicateTags.value = isDuplicate.value ? [value] : []
284284
285-
emit('tag-state', validTags, invalidTags, duplicateTags)
285+
emit('tag-state', validTags.value, invalidTags.value, duplicateTags.value)
286286
}
287287
288288
const onChange = (e: Event): void => {

0 commit comments

Comments
 (0)