React-calendar-timeline: ItemRenderer is not working

Created on 26 Sep 2018  路  6Comments  路  Source: namespace-ee/react-calendar-timeline

Describe the bug
I can't use itemRenderer. Original example is not working
https://codesandbox.io/s/04l9x67qxv
Please help me!

Screenshots
image

bug documentation pending-release

All 6 comments

You have to pass in getItemProps() in div tag like this

itemRenderer = ({ item,getItemProps }) => { return ( <div {...getItemProps()} > <span style={{ fontWeight: 600 }}>Hack:</span> <span style={{ textDecoration: "underline" }}>{item.title}</span> </div> ); };

Also, shouldn't this be posted in stack overflow?

You have to pass in getItemProps() in div tag like this

itemRenderer = ({ item,getItemProps }) => { return ( <div {...getItemProps()} > <span style={{ fontWeight: 600 }}>Hack:</span> <span style={{ textDecoration: "underline" }}>{item.title}</span> </div> ); };

Also, shouldn't this be posted in stack overflow?

Thanks for your help.
Author should update div {...getItemProps()} in codesandbox example
image.

Thank you very much.

Yup! I should. I will update it then close this issue to keep track

@Ilaiwi to jump in on this one. The default item renderer seems to have changed behaviour.

Previously, the item's text would be this.itemTitle, now it is this.itemDivTitle

Previously the item's div title (the tooltip) would be this.itemDivTitle, it is now not set.

@acemac yes you are correct my bad. I will keep this open then, but if you would like to create another issue with a codesandbox example that would be appreciated.

released in 0.22.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fredrik-bjaras picture fredrik-bjaras  路  5Comments

ivikash picture ivikash  路  5Comments

danielcruser picture danielcruser  路  3Comments

sebastienbinda picture sebastienbinda  路  5Comments

aufgussmeister picture aufgussmeister  路  5Comments