You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone,
i had a search here but wasnt able to find a similiar question.
I am trying to render the current cell as HTML to display a category icon. My API returns an object with an encoded base64 icon that i wanted to display in the table. Currently I am getting the result form cell.render('Cell') and managed to render the icon however it's rendering for all cells :-D I def. have spent too muhc time on it at this stage and can't think clearly anymore...i am sure it's something stupid what i am missing ...
any help or idea what to try would be appreciated
This is the table body to render the icon:
// ...consthtmlDecode=(input: any): string=>{vare=document.createElement('div');//the below is already returns as <img src="" .... />e.innerHTML=input.props.data[0].icon;returne!.innerHTML;};<tbody{...getTableBodyProps()}>{rows.map((row,i)=>{prepareRow(row);return(<tr{...row.getRowProps()}key={i}>{row.cells.map((cell,ix)=>{return(<td{...cell.getCellProps()}key={ix}><spandangerouslySetInnerHTML={{__html: htmlDecode(cell.render('Cell')),}}></span></td>);})}</tr>);})}</tbody>// ...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
i had a search here but wasnt able to find a similiar question.
I am trying to render the current cell as HTML to display a category icon. My API returns an object with an encoded base64 icon that i wanted to display in the table. Currently I am getting the result form
cell.render('Cell')
and managed to render the icon however it's rendering for all cells :-D I def. have spent too muhc time on it at this stage and can't think clearly anymore...i am sure it's something stupid what i am missing ...any help or idea what to try would be appreciated
This is the table body to render the icon:
Beta Was this translation helpful? Give feedback.
All reactions