Skip to content

Commit

Permalink
Fix missing events in week view
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
  • Loading branch information
st3iny committed Aug 23, 2022
1 parent dceecc8 commit c5b5f16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/CalendarGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ export default {
dayHeaderDidMount,
eventDidMount,
noEventsDidMount,
eventOrder: ['start', '-duration', 'allDay', eventOrder],
// FIXME: remove title if upstream is fixed (https://github.com/fullcalendar/fullcalendar/issues/6608#issuecomment-954241059)
eventOrder: ['title', 'start', '-duration', 'allDay', eventOrder],
forceEventDuration: false,
headerToolbar: false,
height: '100%',
Expand Down
2 changes: 2 additions & 0 deletions src/fullcalendar/rendering/eventOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ 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 @@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import eventOrder from "../../../../../src/fullcalendar/rendering/eventOrder.js";
import eventOrder from '../../../../../src/fullcalendar/rendering/eventOrder.js'

describe('fullcalendar/eventOrder test suite', () => {

Expand Down Expand Up @@ -107,8 +107,10 @@ 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 c5b5f16

Please sign in to comment.