( props: SortedTableInHtmlTableProps & HtmlTableProps, )
| 22 | import {useSortingAndPagination} from './SortedTablePaginator.tsx'; |
| 23 | |
| 24 | export const SortedTableInHtmlTable: typeof SortedTableInHtmlTableDecl = ( |
| 25 | props: SortedTableInHtmlTableProps & HtmlTableProps, |
| 26 | ): JSXElement => { |
| 27 | const [sortAndOffset, handleSort, paginatorComponent] = |
| 28 | useSortingAndPagination( |
| 29 | () => props.cellId, |
| 30 | () => props.descending, |
| 31 | () => props.sortOnClick, |
| 32 | () => props.offset, |
| 33 | () => props.limit, |
| 34 | useRowCount( |
| 35 | () => props.tableId, |
| 36 | () => props.store, |
| 37 | ), |
| 38 | () => props.paginator ?? false, |
| 39 | () => props.onChange, |
| 40 | ); |
| 41 | return HtmlTable({ |
| 42 | ...props, |
| 43 | params: getParams( |
| 44 | useCells( |
| 45 | useTableCellIds( |
| 46 | () => props.tableId, |
| 47 | () => props.store, |
| 48 | ), |
| 49 | () => props.customCells, |
| 50 | () => (props.editable === true ? EditableCellView : CellView), |
| 51 | ), |
| 52 | getStoreCellComponentProps(props.store, props.tableId), |
| 53 | useSortedRowIds( |
| 54 | () => props.tableId, |
| 55 | () => sortAndOffset()[0], |
| 56 | () => sortAndOffset()[1], |
| 57 | () => sortAndOffset()[2], |
| 58 | () => props.limit, |
| 59 | () => props.store, |
| 60 | ), |
| 61 | props.extraCellsBefore, |
| 62 | props.extraCellsAfter, |
| 63 | sortAndOffset, |
| 64 | handleSort, |
| 65 | paginatorComponent, |
| 66 | ), |
| 67 | }); |
| 68 | }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…