Skip to content

Commit

Permalink
smarter about keys in timecol bg events
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Jun 9, 2020
1 parent 11f32a5 commit e3c05ab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/timegrid/src/TimeCol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,11 @@ export class TimeCol extends BaseComponent<TimeColProps> {

let children = segs.map((seg) => {

// inverse-background events don't have specific instances
// TODO: might be a key collision. better solution
let { eventRange } = seg
let key = eventRange.instance ? eventRange.instance.instanceId : eventRange.def.defId
let key = eventRange.instance
? eventRange.instance.instanceId
: eventRange.def.defId + ':' + eventRange.range.start.toISOString()
// inverse-background events don't have specific instances. TODO: better solution

return (
<div key={key} className='fc-timegrid-bg-harness' style={this.computeSegTopBottomCss(seg)}>
Expand All @@ -209,7 +210,7 @@ export class TimeCol extends BaseComponent<TimeColProps> {
)
})

return createElement(Fragment, {}, ...children)
return <Fragment>{children}</Fragment>
}


Expand Down

0 comments on commit e3c05ab

Please sign in to comment.