Open CodeSpent opened 2 years ago
I think this would be good as an optional configuration, but it should also be able to sort by the original position in array.
I think this would be better to sort outside the component, in javascript on client side before passing props to Timeline component or on server side.
What would happen if the dates overlapped?
Considering this component acts as a timeline and date ranges are provided, this could be used for sorting the timeline elements in chronological order.
I was able to get this working in my own project, and will look at opening a PR for this.