Skip to content

Commit

Permalink
chore: update component docs (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
imballinst authored Mar 27, 2023
1 parent 4c34193 commit 4450e17
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/TableBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
} from '../helpers/types';
import { makeClasses } from '../helpers/object';
import { useDatatableWrapper } from './DatatableWrapper';
import { getNextCheckboxState } from '../helpers/checkbox';
import {
useControlledStateSetter,
useCreateCheckboxHandlers
Expand Down Expand Up @@ -170,21 +169,18 @@ export interface TableRowProps<TTableRowType extends TableRowType> {
* ```
* <TableBody>
* {
* data.map(row => (
* data.map((row, rowIdx) => (
* row.isLoading ? (
* <tr><td colSpan={headers.length}><Loading /></td></tr>
* ) : (
* <TableRow rowData={row} />
* <TableRow rowData={row} rowIdx={rowIdx} />
* )
* ))
* }
* </TableBody>
* ```
*
* The above snippet will render loading indicator for rows that don't have sufficient data to store yet.
*
* @param param0
* @returns
*/
export function TableRow<TTableRowType extends TableRowType>({
rowData,
Expand Down

0 comments on commit 4450e17

Please sign in to comment.