0

In the app I am currently working on, there is a "Description" column which I would like to have rich text. This would be stored in my database in Markdown format. Is there anyway when using react-table to have cells contain content in another component, in this case so the content could be rendered by react-markdown?

Before implementing react-table I was able to parse the markdown in the description cells with <td><ReactMarkdown>{item.description}</ReactMarkdown></td>, but I'm not seeing a way to accomplish this with react-table.

This is the code in question: https://github.com/TechValleyCenterOfGravity/STUFF/blob/main/src/App.js

RyanM
  • 25
  • 4
  • I was able to figure out the the [column options](https://react-table.tanstack.com/docs/api/useTable#column-options) and added the following ```cell: props => { props.value }```, unfortunately the markdown is still not being parsed. – RyanM Mar 28 '21 at 21:32

1 Answers1

0

I missed a capital C - Cell: props => <ReactMarkdown>{ props.value }</ReactMarkdown> did the trick

RyanM
  • 25
  • 4