Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make DataGroup compatible with TimelineGroup (#149)
Currently TimelineGroup[] cannot be used in the constructor for Timeline nor the setData method. `TimelineGroup.content` is of type `string | HTMLElement` which is currently not assignable to `DataGroupCollectionType.content`. However the docs say a group can contain an `HTMLElement`. A Timeline Group's `subgroupOrder` function accepts a string or a sort function. The `TimelineGroup`'s function (which is a sort function) does not match the `DataGroup`'s function. `DataGroup`'s function was changed to be a sort function like `TimelineGroup`. Now a TimelineGroup[] can be used in the constructor to make a Timeline. The other option would be to set `Timeline`'s constructor to TimelineGroup instead of DataGroup and all methods as well.
- Loading branch information