Merge pull request #57 from Safelite/defect/Digital/SSR-138

Fix Invalid prop warning for modelValue in base-input-button component
This commit is contained in:
Johan Gunawan 2022-12-01 13:33:22 -05:00 committed by GitHub
commit b024112cac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,9 +3,16 @@ export const inputButtonProps = {
type: [String, Number],
required: true,
},
modelValue: {
type: [Array, String, Number],
modelValue: {
required: true,
validation: function(prop) {
return (
prop === null
|| Array.isArray(prop)
|| typeof prop === 'string'
|| (typeof prop === 'number' && !Number.isNaN(prop))
)
}
},
isMultiSelect: Boolean,
groupName: {