0.0.9 • Published 7 years ago

@entria/datalist v0.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
7 years ago

DataList

Install

npm i @entria/datalist --save
yarn add @entria/datalist

Usage

<DataList
  environment={Environment}
  query={graphql`
    query DataListQuery($first: Int!) {
      users(first: $first) @connection(key: "DataList_users") {
        edges {
          node {
            id
            name
            active
          }
        }
        pageInfo {
          hasNextPage
        }
      }
    }
  `}
  table={{
    columns: [
      {
        label: 'Name',
        property: 'name',
      },
      {
        label: 'Active',
        render: (user) => user.active ? 'Yes' : 'No',
      },
    ],
  }}
  checkboxes={{
    component: (props) => <input type="checkbox" {...props} />,
    onChange: (values) => console.log(values),
  }}
/>

Props

  • environment: The Relay Environment
  • query: The Relay query
  • fragments: An object with the query fragments
  • variables: An object with the query default variables
  • table: An object with table configs
  • checkboxes: An object with checkboxes configs
0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago