Skip to content

Commit

Permalink
fix: restore original event ordering
Browse files Browse the repository at this point in the history
The underlying issue has been fixed upstream.

This reverts:
- c5b5f16 (#4431)
- 5334250 (#4646)

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
  • Loading branch information
st3iny committed Mar 18, 2024
1 parent 155e54d commit ded1f29
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions src/components/CalendarGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ export default {
dayHeaderDidMount,
eventDidMount,
noEventsDidMount,
// FIXME: remove title if upstream is fixed (https://github.com/fullcalendar/fullcalendar/issues/6608#issuecomment-954241059)
eventOrder: (this.$route.params.view === 'timeGridWeek' ? ['title'] : []).concat(['start', '-duration', 'allDay', eventOrder]),
eventOrder: ['start', '-duration', 'allDay', eventOrder],
forceEventDuration: false,
headerToolbar: false,
height: '100%',
Expand Down
2 changes: 0 additions & 2 deletions src/fullcalendar/rendering/eventOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ export default function(firstEvent, secondEvent) {
return (firstEvent.extendedProps.calendarId < secondEvent.extendedProps.calendarId) ? -1 : 1
}

/* FIXME: uncomment this if upstream is fixed (https://github.com/fullcalendar/fullcalendar/issues/6608#issuecomment-954241059)
if (firstEvent.title !== secondEvent.title) {
return (firstEvent.title < secondEvent.title) ? -1 : 1
}
*/

return 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ describe('fullcalendar/eventOrder test suite', () => {
title: 'Title 456',
}

/* FIXME: uncomment if upstream is fixed (https://github.com/fullcalendar/fullcalendar/issues/6608#issuecomment-954241059)
expect(eventOrder(firstEvent, secondEvent)).toEqual(-1)
expect(eventOrder(secondEvent, firstEvent)).toEqual(1)
*/
})

it('should return zero if all properties are equal', () => {
Expand Down

0 comments on commit ded1f29

Please sign in to comment.