MaTeMaTuK / gantt-task-react

Gantt chart for React with Typescript
MIT License
899 stars 494 forks source link

Return Click synthetic event on task click #183

Open khanzzirfan opened 1 year ago

khanzzirfan commented 1 year ago

Hello Team, It is understandable that tooltip content is to just display content. But I have a custom requirement that to show popover content instead of just tooltip. The idea of popover is to have extra buttons, user can click actions on popover etc. Like a context menu.

Thought this would be useful in mycase to show custom popover with buttons on task click. To attach a popover on button it requires event.target to be set on the popover to position correctly. It would be helpful if you could return the synthetic event on task click.

Or the other idea is to pass custom data-* attributes or class names to task rectangle element, which can be then found later using doc.getElementby(...) and attach the pop element to it.