From b2748703f37242fad773cfbd89325d8c5143e5be Mon Sep 17 00:00:00 2001 From: cutterbl Date: Fri, 26 Jan 2024 10:26:33 -0500 Subject: [PATCH] fix: add isBackgroundEvent to onSelectEvent event obj --- src/DayColumn.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/DayColumn.js b/src/DayColumn.js index 173662037..9a1964a88 100644 --- a/src/DayColumn.js +++ b/src/DayColumn.js @@ -241,7 +241,16 @@ class DayColumn extends React.Component { resource={this.props.resource} selected={isSelected(event, selected)} onClick={(e) => - this._select({ ...event, sourceResource: this.props.resource }, e) + this._select( + { + ...event, + ...(this.props.resource && { + sourceResource: this.props.resource, + }), + ...(isBackgroundEvent && { isBackgroundEvent: true }), + }, + e + ) } onDoubleClick={(e) => this._doubleClick(event, e)} isBackgroundEvent={isBackgroundEvent}