stephane-monnot / react-vertical-timeline

Vertical timeline for React.js
https://stephane-monnot.github.io/react-vertical-timeline/
MIT License
1.08k stars 157 forks source link

Timeline events should use dates to order rather than rely on their position in an array. #138

Open CodeSpent opened 2 years ago

CodeSpent commented 2 years ago

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.

joejcox commented 1 year 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.

stephane-monnot commented 1 year ago

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.

clbenoit commented 8 months ago

What would happen if the dates overlapped?