diff --git a/backend/src/components/scheduler/SchedulerComponent.tsx b/backend/src/components/scheduler/SchedulerComponent.tsx index 23aecceb..2c58df59 100644 --- a/backend/src/components/scheduler/SchedulerComponent.tsx +++ b/backend/src/components/scheduler/SchedulerComponent.tsx @@ -23,7 +23,7 @@ const SchedulerComponent = forwardRef((_, ref) => { case 'day': return default: - return '' + return null } }, [view]) diff --git a/backend/src/components/scheduler/components/month/MonthTable.tsx b/backend/src/components/scheduler/components/month/MonthTable.tsx index bf3af94d..bedd00f9 100644 --- a/backend/src/components/scheduler/components/month/MonthTable.tsx +++ b/backend/src/components/scheduler/components/month/MonthTable.tsx @@ -61,6 +61,7 @@ const MonthTable = ({ daysList, resource, eachWeekStart }: Props) => { resourcedEvents = getResourcedEvents(events, _resource, resourceFields, fields) } const rows: ReactNode[] = [] + const cellHeights: number[] = [] for (const startDay of eachWeekStart) { const cells = weekDays.map((d) => { @@ -78,13 +79,17 @@ const MonthTable = ({ daysList, resource, eachWeekStart }: Props) => { return false }) const isToday = isTimeZonedToday({ dateLeft: today, timeZone }) + const _cellHeight = 27 + 26 * todayEvents.length + 17 + 12 + 10 + cellHeights.push(_cellHeight) + // const cellHeight = Math.max(CELL_HEIGHT, ...cellHeights) + const cellHeight = CELL_HEIGHT return ( - + { handleGotoDay(e) } }} - cellHeight={CELL_HEIGHT} + cellHeight={cellHeight} /> @@ -147,7 +152,7 @@ const MonthTable = ({ daysList, resource, eachWeekStart }: Props) => { return rows }, [ - CELL_HEIGHT, + // CELL_HEIGHT, cellRenderer, daysList, disableGoToDay,