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
v-select throws "Invalid prop: type check failed" error when selecting model in MiscConfigCard
Description
The Model Selection dropdown in the Miscelaneous Configuration card has a critical bug where the v-model and :items props are bound to the same variable (models). This causes the component to break when a user selects or deselects a model option.
When a user selects a model from the dropdown, the array of model options gets overwritten with the selected string value, causing Vue to throw a type error. Additionally, when the selection is cleared, the dropdown shows "no data available" because the items array has been replaced.
Original Behaviour
User opens the calibration configuration page
User clicks on the Model Selection dropdown - sees list of models
User selects a model (e.g., "Ridge Regression")
Vue throws error: [Vue warn]: Invalid prop: type check failed for prop "items". Expected Array, got String
User clicks the clear button (X) to deselect
Dropdown shows: "no data available" - no models are visible anymore
The component is now broken and cannot be used properly
Root Cause: Both v-model and :items were bound to the same models variable:
<v-selectv-model="models" :items="models" ... />
This creates a conflict where:
models starts as an array: ['Linear Regression', 'Ridge Regression', ...]
On selection, v-model overwrites it with a string: "Ridge Regression"
Vue expects an array for :items but receives a string → error
On clear, models becomes null → no items to display
Expected Behaviour
User opens the calibration configuration page
User clicks on the Model Selection dropdown - sees list of all available models
User selects a model (e.g., "Ridge Regression")
No errors - selection works smoothly
The selected model is displayed in the dropdown
User can clear the selection using the clear button (X)
Dropdown still shows all available models when reopened
User can select a different model at any time
The selected model value is properly stored in Vuex store
Files Changed
src/components/calibration/MiscConfigCard.vue
Solution Applied
Separated the conflicting variable into two distinct variables:
selectedModel: Stores the currently selected model value (used with v-model)
modelOptions: Stores the array of available model options (used with :items)
This ensures the items array remains intact while the selected value can change independently.
Before Fix :-
Issue: Model Selection Dropdown Conflict
Title
v-select throws "Invalid prop: type check failed" error when selecting model in MiscConfigCard
Description
The Model Selection dropdown in the Miscelaneous Configuration card has a critical bug where the
v-modeland:itemsprops are bound to the same variable (models). This causes the component to break when a user selects or deselects a model option.When a user selects a model from the dropdown, the array of model options gets overwritten with the selected string value, causing Vue to throw a type error. Additionally, when the selection is cleared, the dropdown shows "no data available" because the items array has been replaced.
Original Behaviour
[Vue warn]: Invalid prop: type check failed for prop "items". Expected Array, got StringRoot Cause: Both
v-modeland:itemswere bound to the samemodelsvariable:This creates a conflict where:
modelsstarts as an array:['Linear Regression', 'Ridge Regression', ...]v-modeloverwrites it with a string:"Ridge Regression":itemsbut receives a string → errormodelsbecomesnull→ no items to displayExpected Behaviour
Files Changed
src/components/calibration/MiscConfigCard.vueSolution Applied
Separated the conflicting variable into two distinct variables:
selectedModel: Stores the currently selected model value (used withv-model)modelOptions: Stores the array of available model options (used with:items)This ensures the items array remains intact while the selected value can change independently.
Before Fix :-
BeforeFixEyeTracker.mp4
After fix:-
AfterFixEyeTracker.mp4