guiqui / react-timeline-gantt

A react Timeline component with virtual rendering
MIT License
544 stars 132 forks source link

Allow Classname passtrough for data items #34

Open masbaehr opened 5 years ago

masbaehr commented 5 years ago

This would help for adding additional functionality (e.g. tooltips) or conditionally rendered data items.

{
        id: counter,
        start: new Date(),
        end: new Date(),
        name: "myItem",
        color: "#FF0000",
        class: "eventType1"
      }

This allows me to select items with class "eventType1" and do additional work on them. An even better approach would be to pass-trough all data-properties. But i was not aware how to do that quickly..

codecov[bot] commented 5 years ago

Codecov Report

Merging #34 into master will increase coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
+ Coverage   79.86%   79.93%   +0.06%     
==========================================
  Files          16       16              
  Lines         591      593       +2     
==========================================
+ Hits          472      474       +2     
  Misses        119      119
Impacted Files Coverage Δ
src/lib/components/viewport/DataViewPort.js 74.07% <ø> (ø) :arrow_up:
src/lib/components/viewport/DataTask.js 70.58% <100%> (+0.7%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cc33fe9...92295f2. Read the comment docs.