From 5e89a14b63436ae0fc26913966fa53c2b6df12d5 Mon Sep 17 00:00:00 2001 From: Johan Gunawan Date: Thu, 1 Dec 2022 12:26:44 -0500 Subject: [PATCH] Fix Invalid prop warning for modelValue in base-input-button component --- .../base-input-button/button-functionality-props.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/common-components/base-input-button/button-functionality-props.js b/src/common-components/base-input-button/button-functionality-props.js index 1faa369e..ec83f95f 100644 --- a/src/common-components/base-input-button/button-functionality-props.js +++ b/src/common-components/base-input-button/button-functionality-props.js @@ -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: {