Skip to content

Commit ef30208

Browse files
authored
Merge pull request #74 from ut-code/develop
release 2026/01/06
2 parents 5b99723 + e687e01 commit ef30208

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

client/src/components/Calendar.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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",

0 commit comments

Comments
 (0)