Skip to content

Commit

Permalink
Only add hover classes when first value was selected
Browse files Browse the repository at this point in the history
Closes #505
  • Loading branch information
wojtekmaj committed Aug 26, 2021
1 parent 7c5d757 commit d1a8994
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/shared/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ export function getTileClasses({

classes.push(...valueRangeClassNames);

if (hover) {
const hoverRange = hover > valueRange[1] ? [valueRange[1], hover] : [hover, valueRange[0]];
const valueArray = [].concat(value);

if (hover && valueArray.length === 1) {
const hoverRange = hover > valueRange[0] ? [valueRange[0], hover] : [hover, valueRange[0]];
const hoverRangeClassNames = getRangeClassNames(hoverRange, dateRange, `${className}--hover`);

classes.push(...hoverRangeClassNames);
Expand Down

0 comments on commit d1a8994

Please sign in to comment.