[#63] added reload button and corresponding tests

This commit is contained in:
Camille Moussu
2025-09-11 14:42:38 +02:00
parent 4b71a6e3c7
commit 4b31d34414
2 changed files with 173 additions and 1 deletions
+23 -1
View File
@@ -268,6 +268,28 @@ export default function CalendarApp() {
height={"100%"}
select={handleDateSelect}
nowIndicator
customButtons={{
refresh: {
text: "↻",
click: () => {
selectedCalendars.forEach((id) => {
if (!pending && rangeKey) {
dispatch(
getCalendarDetailAsync({
calId: id,
match: {
start: formatDateToYYYYMMDDTHHMMSS(
calendarRange.start
),
end: formatDateToYYYYMMDDTHHMMSS(calendarRange.end),
},
})
);
}
});
},
},
}}
views={{
timeGridWeek: { titleFormat: { month: "long", year: "numeric" } },
}}
@@ -401,7 +423,7 @@ export default function CalendarApp() {
headerToolbar={{
left: "title",
center: "prev,today,next",
right: "dayGridMonth,timeGridWeek,timeGridDay",
right: "refresh,dayGridMonth,timeGridWeek,timeGridDay",
}}
eventContent={(arg) => {
const event = arg.event;