Skip to content

Commit fc6fca6

Browse files
committed
BFormTags: parameter for tagValidator function is always defined.
1 parent 9d079da commit fc6fca6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,8 +2087,8 @@ export default defineComponent({
20872087
)
20882088
}
20892089
2090-
const tagValidator = (tag: string | undefined) =>
2091-
!!tag && tag === tag.toLowerCase() && tag.length > 2 && tag.length < 6
2090+
const tagValidator = (tag: string) =>
2091+
tag === tag.toLowerCase() && tag.length > 2 && tag.length < 6
20922092
20932093
function onTagState(valid: string[], invalid: string[], duplicate: string[]) {
20942094
// console.log({

src/components/BFormTags/BFormTags.vue

Lines changed: 1 addition & 1 deletion
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?: string) => boolean
144+
tagValidator?: (t: string) => boolean
145145
tagVariant?: ColorVariant
146146
}
147147

src/types/components/BFormTags/BFormTags.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface Props {
3030
tagPills?: boolean
3131
tagRemoveLabel?: string
3232
tagRemovedLabel?: string
33-
tagValidator?: (t: unknown) => boolean
33+
tagValidator?: (t: string) => boolean
3434
tagVariant?: ColorVariant
3535
}
3636
// Emits

0 commit comments

Comments
 (0)