Skip to content

Commit

Permalink
fix: Calendar の年選択ボタンのイベント伝播を阻止する (#1803)
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr authored Aug 18, 2021
1 parent fca6210 commit bcf378d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ export const Calendar = forwardRef<HTMLElement, Props & ElementProps>(
{currentMonth.year()}{currentMonth.month() + 1}
</YearMonth>
<SecondaryButton
onClick={() => setIsSelectingYear(!isSelectingYear)}
onClick={(e) => {
e.stopPropagation()
setIsSelectingYear(!isSelectingYear)
}}
size="s"
square
aria-expanded={isSelectingYear}
Expand Down

0 comments on commit bcf378d

Please sign in to comment.