glittershark / reactable

Fast, flexible, and simple data tables in React
glittershark.github.io/reactable
MIT License
1.51k stars 222 forks source link

render html inside Td #240

Open yocmen opened 8 years ago

yocmen commented 8 years ago

i have this:

var Table = Reactable.Table,
      Tr    = Reactable.Tr,
      Td    = Reactable.Td;
var rows = <Tr><Td column='' colSpan={7} className="text-center" style={{background:"#1C1B1B", color:"#F0CF2A"}}><img src="assets/images/loading2.svg" alt="loading..." /><br/>Loading... please wait...</Td></Tr>;

return (
       <Table className="table table-bordered" role="grid" sortable={['Partner', 'Errors', 'Date']} filterable={['Partner', 'Errors', 'Date']} filterPlaceholder={'Filter by Partner/Error/'}>
              {rows}
       </Table>
);

and return in my cell [object Object],[object Object],Loading... please wait...

what i am doing wrong? can u help me?

tuckwat commented 8 years ago

Try wrapping your Reactable.Td contents in a div.

glittershark commented 8 years ago

it looks like we're not properly handling multiple HTML element children within the Td

cxlove commented 7 years ago

How about this issue now? Still not fixed?

cxlove commented 7 years ago

All right, wrapping inside a div tab is work for me.

byhoung commented 7 years ago

Wrapping the Td contents inside the div works, but it seems to break the filtering functionality.