namespace-ee / react-calendar-timeline

A modern and responsive react timeline component.
MIT License
1.93k stars 625 forks source link

Item collision event #898

Open terox opened 1 year ago

terox commented 1 year ago

Issue Number

523

Overview of PR

We added the functionality to detect collision between items in the same group.

Now you can detect collisions doing:

export default function Timetable() {
  const handleItemCollision = (currentItem, item) => {
    console.log('Item ' + currentItem.id + 'collided with ' + item.id)
  }

  return (
    <Timeline onCollision={this.handleItemCollision} />
  );
}

Authors of commit @GabrielCrackPro @albertoncp @terox