Skip to content

Commit

Permalink
fix: arrow position when placement is right (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Jun 11, 2024
1 parent 198c586 commit f11155a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/PickerInput/Selector/RangeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,8 @@ function RangeSelector<DateType extends object = any>(
[offsetUnit]: offset,
}));
const placementRight = placement?.toLowerCase().endsWith('right');
const startOffset = placementRight
? parentElement?.offsetWidth - 20
: 0;
const endOffset = placementRight
? offsetWidth - 20
: offset;
onActiveOffset(activeIndex === 0 ? startOffset : endOffset);
const startOffset = placementRight ? parentElement?.offsetWidth : 0;
onActiveOffset(activeIndex === 0 ? startOffset : offset);
}
});

Expand Down

0 comments on commit f11155a

Please sign in to comment.