Skip to content

Commit

Permalink
Fixes Clear button on Variant select when deselecting
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenmcsorleyipg committed Jan 29, 2025
1 parent e8513a5 commit 2da2cd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/VehicleSelector/VehicleSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ function VehicleSelector({
}
}}
size={size}
value={selectedVariants}
// if array is empty set to null to avoid rendereing the clear button
value={
multipleSelection ? selectedVariants : selectedVariants[0] || null
}
/>
</Box>

Expand Down

0 comments on commit 2da2cd0

Please sign in to comment.