( props: ValuesInHtmlTableProps & HtmlTableProps, )
| 30 | }); |
| 31 | |
| 32 | export const ValuesInHtmlTable: typeof ValuesInHtmlTableDecl = ( |
| 33 | props: ValuesInHtmlTableProps & HtmlTableProps, |
| 34 | ): JSXElement => { |
| 35 | const valueIds = useValueIds(() => props.store); |
| 36 | return ( |
| 37 | <table class={props.className}> |
| 38 | {props.headerRow === false ? null : ( |
| 39 | <thead> |
| 40 | <tr> |
| 41 | {extraHeaders(props.extraCellsBefore as any)} |
| 42 | {props.idColumn === false ? null : <th>Id</th>} |
| 43 | <th>{VALUE}</th> |
| 44 | {extraHeaders(props.extraCellsAfter as any)} |
| 45 | </tr> |
| 46 | </thead> |
| 47 | )} |
| 48 | <tbody> |
| 49 | {arrayMap(valueIds(), (valueId) => { |
| 50 | const valueProps = {valueId, store: props.store}; |
| 51 | const Value = |
| 52 | props.valueComponent ?? |
| 53 | (getValue(props.editable as any) === true |
| 54 | ? EditableValueView |
| 55 | : ValueView); |
| 56 | return ( |
| 57 | <tr> |
| 58 | {extraValueCells(props.extraCellsBefore as any, valueProps)} |
| 59 | {isFalse(props.idColumn) ? null : ( |
| 60 | <th title={valueId}>{valueId}</th> |
| 61 | )} |
| 62 | <td> |
| 63 | <Value |
| 64 | {...getProps(props.getValueComponentProps, valueId)} |
| 65 | {...valueProps} |
| 66 | /> |
| 67 | </td> |
| 68 | {extraValueCells(props.extraCellsAfter as any, valueProps)} |
| 69 | </tr> |
| 70 | ); |
| 71 | })} |
| 72 | </tbody> |
| 73 | </table> |
| 74 | ); |
| 75 | }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…