Browse Source

Fix: Fixes error in React example when adding a ranged item (#2521)

* Fix redraw order
* Fix error when option is not defined
* Allow template labels
* Fix react example
fix2580
yotamberk 7 years ago
committed by Alexander Wunschik
parent
commit
cdba4c1491
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      examples/timeline/other/usingReact.html

+ 2
- 0
examples/timeline/other/usingReact.html View File

@ -88,10 +88,12 @@
end: new Date(1000*60*60*24 + (new Date()).valueOf()),
editable: true,
template: function (item, element) {
if (!item) { return }
ReactDOM.unmountComponentAtNode(element);
return ReactDOM.render(<ItemTemplate item={item} />, element);
},
groupTemplate: function (group, element) {
if (!item) { return }
ReactDOM.unmountComponentAtNode(element);
return ReactDOM.render(<GroupTemplate group={group} />, element);
}

Loading…
Cancel
Save