New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@govuk-frederic/array-object-table

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-frederic/array-object-table

govuk-frederic: Frederic project specific components.

  • 0.0.5
  • npm
  • Socket score

Version published
Maintainers
4
Created

ArrayObjectTable

Import

  import ArrayObjectTable from '@govuk-frederic/array-object-table';

Usage

Simple

const fields = [
  { key: 'one', heading: 'One' },
  { key: 'two', heading: 'Two' },
];
const array = [
  { one: 'test', two: 'test' },
  { one: 'test' },
  {},
];
const title = ['Heading'];

<ArrayObjectTable fields={fields} array={array} title={title}/>;

With skipEmptyRows

const fields = [
  { key: 'one', heading: 'One' },
  { key: 'two', heading: 'Two' },
];
const array = [
  {},
  {},
];
const title = ['Heading'];

<ArrayObjectTable fields={fields} array={array} title={title} skipEmptyRows/>

With skipEmptyRows and hideWithNoValues

const fields = [
  { key: 'one', heading: 'One' },
  { key: 'two', heading: 'Two' },
];
const array = [
  {},
  {},
];
const title = ['Heading'];

<ArrayObjectTable fields={fields} array={array} title={title} skipEmptyRows hideWithNoValues/>;

Properties

PropRequiredDefaultTypeDescription
array[]arrayOf[object Object]
fields[]arrayOf[object Object]
hideWithNoValuesfalsebool
skipEmptyRowsfalsebool
title``````node

FAQs

Package last updated on 13 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts