Skip to content

Commit db86ac1

Browse files
committed
feat(calendar-web): add showAllEvents prop for month view
1 parent 301a3c3 commit db86ac1

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

packages/pluggableWidgets/calendar-web/src/Calendar.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@
222222
<enumerationValue key="hidden">Hidden</enumerationValue>
223223
</enumerationValues>
224224
</property>
225+
<property key="showAllEvents" type="boolean" defaultValue="true">
226+
<caption>Show all events</caption>
227+
<description>Auto-adjust calendar height to display all events without "more" links</description>
228+
</property>
225229
</propertyGroup>
226230
</properties>
227231
</widget>

packages/pluggableWidgets/calendar-web/src/utils/calendar-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ export function extractCalendarProps(props: CalendarContainerProps): DragAndDrop
150150
onSelectSlot: handleSelectSlot,
151151
startAccessor: (event: CalEvent) => event.start,
152152
titleAccessor: (event: CalEvent) => event.title,
153+
showAllEvents: props.showAllEvents,
153154
min: minTime,
154155
max: maxTime
155156
};

packages/pluggableWidgets/calendar-web/typings/CalendarProps.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export interface CalendarContainerProps {
5858
maxHeightUnit: MaxHeightUnitEnum;
5959
maxHeight: number;
6060
overflowY: OverflowYEnum;
61+
showAllEvents: boolean;
6162
}
6263

6364
export interface CalendarPreviewProps {
@@ -100,4 +101,5 @@ export interface CalendarPreviewProps {
100101
maxHeightUnit: MaxHeightUnitEnum;
101102
maxHeight: number | null;
102103
overflowY: OverflowYEnum;
104+
showAllEvents: boolean;
103105
}

0 commit comments

Comments
 (0)