MCPcopy Create free account
hub / github.com/atomicdata-dev/atomic-data-browser / AllProps

Function AllProps

data-browser/src/components/AllProps.tsx:24–52  ·  view source on GitHub ↗

Lists all PropVals for some resource. Optionally ignores a bunch of subjects

({
  resource,
  except = [],
  editable,
  columns,
}: Props)

Source from the content-addressed store, hash-verified

22
23/** Lists all PropVals for some resource. Optionally ignores a bunch of subjects */
24function 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
54export default AllProps;

Callers

nothing calls this directly

Calls 1

getPropValsMethod · 0.80

Tested by

no test coverage detected