Skip to content

Commit

Permalink
fix: resolve resizing events in Month view
Browse files Browse the repository at this point in the history
Resolves issue where user could no longer resize events in the Month view.

#2207
  • Loading branch information
cutterbl authored Jul 7, 2022
1 parent 6a160ca commit c7b105f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/addons/dragAndDrop/WeekWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c7b105f

Please sign in to comment.