How to use the @material/data-table.cssClasses.CONTENT function in @material/data-table

To help you get started, we’ve selected a few @material/data-table examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github material-components / material-components-web-catalog / src / DataTableCatalog.js View on Github external
const dataTable = React.createRef();

  useEffect(() => {
    MDCDataTable.attachTo(dataTable.current);
  });

  return (
    <div>
      
            {props.rowSelection ?  : null}
            {props.data.headers.map((header, index) =&gt; {header})}
          
                {props.rowSelection ?  : null}
                {row.map((content, index) =&gt; {
                  let id = index === 0 ? rowId : null;
                  return {content};
                })}
              <table>
        <thead>
          <tr></tr>
        </thead>
        <tbody></tbody></table>
          {props.data.rows.map((row, index) =&gt; {
            const isSelected = props.rowSelection ? props.data.selectedRowIndexes.indexOf(index) &gt;= 0 : false;
            const rowId = `u${idIncrement++}`;
            return (
              
            );
          })}
        </div>