From 2ecc46ce3cd1b47baccfdee53e6f76721a53fa44 Mon Sep 17 00:00:00 2001 From: petkir Date: Sat, 11 Jul 2020 19:58:20 +0200 Subject: [PATCH] Client Sorting, not every Source support this --- .../components/CalendarFeedSummary.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/samples/react-calendar-feed/src/webparts/calendarFeedSummary/components/CalendarFeedSummary.tsx b/samples/react-calendar-feed/src/webparts/calendarFeedSummary/components/CalendarFeedSummary.tsx index 88e4a9776..8e87c3a83 100644 --- a/samples/react-calendar-feed/src/webparts/calendarFeedSummary/components/CalendarFeedSummary.tsx +++ b/samples/react-calendar-feed/src/webparts/calendarFeedSummary/components/CalendarFeedSummary.tsx @@ -109,7 +109,7 @@ export default class CalendarFeedSummary extends React.Component +
+ /> )} /> {usePaging && - ); + ); })}
@@ -354,6 +354,10 @@ export default class CalendarFeedSummary extends React.Component 0) { + // order result bacause not every Dataprovider Support Order + events = events.sort((a: ICalendarEvent, b: ICalendarEvent) => { return a.start > b.start ? 1 : - 1; }); + } if (dataProvider.MaxTotal > 0) { events = events.slice(0, dataProvider.MaxTotal); }