Skip to content

Commit

Permalink
improve: Calendar の年選択ボタンのイベント伝播を阻止する
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr committed Aug 11, 2021
1 parent b12322b commit d8315d5
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 d8315d5

Please sign in to comment.