Lists all PropVals for some resource. Optionally ignores a bunch of subjects
({
resource,
except = [],
editable,
columns,
}: Props)
| 22 | |
| 23 | /** Lists all PropVals for some resource. Optionally ignores a bunch of subjects */ |
| 24 | function AllProps({ |
| 25 | resource, |
| 26 | except = [], |
| 27 | editable, |
| 28 | columns, |
| 29 | }: Props): JSX.Element { |
| 30 | return ( |
| 31 | <AllPropsWrapper> |
| 32 | {[...resource.getPropVals()].map( |
| 33 | // This is a place where you might want to use the _val, because of performance. However, we currently don't, because of the form renderer. |
| 34 | // eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 35 | ([prop, _val]): JSX.Element => { |
| 36 | if (except.includes(prop)) { |
| 37 | return null; |
| 38 | } |
| 39 | return ( |
| 40 | <PropVal |
| 41 | columns={columns} |
| 42 | key={prop} |
| 43 | propertyURL={prop} |
| 44 | resource={resource} |
| 45 | editable={editable} |
| 46 | /> |
| 47 | ); |
| 48 | }, |
| 49 | )} |
| 50 | </AllPropsWrapper> |
| 51 | ); |
| 52 | } |
| 53 | |
| 54 | export default AllProps; |
nothing calls this directly
no test coverage detected