File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ export const Calendar = ({
119119
120120 // FullCalendar の state
121121 const [ events , setEvents ] = useState < CalendarEvent [ ] > ( [ ] ) ;
122+ const [ tooltipKey , setTooltipKey ] = useState < number > ( 0 ) ;
122123
123124 // editingSlots/viewingSlots → matrix → events
124125 useEffect ( ( ) => {
@@ -460,6 +461,13 @@ export const Calendar = ({
460461 }
461462 } , [ ] ) ;
462463
464+ /**
465+ * カレンダーで表示される日付範囲が変更されると呼ばれる。 https://fullcalendar.io/docs/datesSet
466+ */
467+ const handleDatesSet = useCallback ( ( ) => {
468+ setTooltipKey ( ( prev ) => prev + 1 ) ;
469+ } , [ ] ) ;
470+
463471 return (
464472 < div className = "my-2 flex-1" id = "ih-cal-wrapper" >
465473 < FullCalendar
@@ -481,8 +489,10 @@ export const Calendar = ({
481489 select = { handleSelect }
482490 eventDidMount = { handleEventDidMount }
483491 eventContent = { handleEventContent }
492+ datesSet = { handleDatesSet }
484493 />
485494 < Tooltip
495+ key = { tooltipKey }
486496 id = "member-info"
487497 style = { {
488498 backgroundColor : "#fff" ,
You can’t perform that action at this time.
0 commit comments