From c7b105f8d59b460b8ed2e45fa90653296651b52c Mon Sep 17 00:00:00 2001 From: Steve 'Cutter' Blades Date: Thu, 7 Jul 2022 11:55:47 -0500 Subject: [PATCH] fix: resolve resizing events in Month view Resolves issue where user could no longer resize events in the Month view. #2207 --- src/addons/dragAndDrop/WeekWrapper.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/addons/dragAndDrop/WeekWrapper.js b/src/addons/dragAndDrop/WeekWrapper.js index 0958b34df..355f946e4 100644 --- a/src/addons/dragAndDrop/WeekWrapper.js +++ b/src/addons/dragAndDrop/WeekWrapper.js @@ -151,12 +151,14 @@ class WeekWrapper extends React.Component { _selectable = () => { let node = this.ref.current.closest('.rbc-month-row, .rbc-allday-cell') let container = node.closest('.rbc-month-view, .rbc-time-view') - - let selector = ( - this._selector = new Selection( - () => container, - { validContainers: ['.rbc-day-slot', '.rbc-allday-cell'] } - )) + let isMonthRow = node.classList.contains('rbc-month-row') + + // Valid container check only necessary in TimeGrid views + let selector = (this._selector = new Selection(() => container, { + validContainers: [ + ...(!isMonthRow ? ['.rbc-day-slot', '.rbc-allday-cell'] : []), + ], + })) selector.on('beforeSelect', (point) => { const { isAllDay } = this.props