IBM / gantt-chart

IBM Gantt Chart Component, integrable in Vanilla, jQuery, or React Framework.
https://ibm.github.io/gantt-chart/packages/ibm-gantt-chart-docs/storybook
Apache License 2.0
215 stars 52 forks source link

How to handle moving tasks and creating links #15

Open adrienthiery opened 4 years ago

adrienthiery commented 4 years ago

Hi there, it's me again 😅

I'm looking into how to interact with the Gantt chart and can't find anything in the storybook about that 🤔

DragnDrop and Handling Selection as marked as "TODO"

Any pointers on how to handle that ?

Thanks a bunch

delhoume commented 4 years ago

Looking at source code it seems there is something implemented for both dradndrop and selection, so maybe this "TODO" is only related to documentation.

You will have to check source code to see what can be done. There are dragdrop.js ans selection.js in core folder

c2r0b commented 1 year ago

For selection handling, looking at source code I found that the configuration object allows a selection property with the following callbacks available:

selection: {
      selectActivities(activities, activity) {
        ...
      },
      unselectActivities(activities) {
        ...
      },
      activitySelectionChanged(activities, activity) {
        ...
      },
      selectRows(rows, row) {
        ...
      },
      unselectRows(rows, row) {
        ...
      },
      rowSelectionChanged(rows, row) {
        ...
      }
}

Hope this helps!

c2r0b commented 1 year ago

PR #76 partially address the missing documentation for this issue