72 |
73 | A basic timeline. You can move and zoom the timeline, and select
74 | items.
75 |
76 |
77 |
78 | This example demonstrate using groups. Note that a DataSet is used for
79 | both items and groups, allowing to dynamically add, update or remove
80 | both items and groups via the DataSet.
81 |
82 |
87 |
88 | )
89 | }
90 |
91 | clickHandler(props) {
92 | const { group } = props
93 | const selectedIds = groupsExample.items
94 | .filter(item => item.group === group)
95 | .map(item => item.id)
96 | this.setState({
97 | selectedIds,
98 | })
99 | }
100 | }
101 |
102 | export default App
103 |
--------------------------------------------------------------------------------
/examples/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/examples/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom'
3 | import App from './App'
4 | import './index.css'
5 |
6 | ReactDOM.render(