move resetting logic
This commit is contained in:
parent
bb055c4806
commit
0003de236f
1 changed files with 4 additions and 8 deletions
|
|
@ -180,13 +180,6 @@ export default {
|
|||
return tintSourceObject.src;
|
||||
},
|
||||
|
||||
// Reset selections when tint changes for the same glass to ensure proper selection.
|
||||
// Also checks if only a single part is present for the tint.
|
||||
ResetTintAndPartSelections() {
|
||||
this.selectedPartNumber = null;
|
||||
this.AutoSelectIfSinglePart();
|
||||
},
|
||||
|
||||
AutoSelectIfSinglePart() {
|
||||
if (this.partsForSelectedTint?.length > 0)
|
||||
{
|
||||
|
|
@ -201,6 +194,9 @@ export default {
|
|||
radioInput?.click();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.selectedPartNumber = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -217,7 +213,7 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
selectedTint() {
|
||||
this.ResetTintAndPartSelections();
|
||||
this.AutoSelectIfSinglePart();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue