Sha256: 672b1daeb65a2642d9dfa4dac15d4c250386b2c4a3968c57f76de5f2b8754cea

Contents?: true

Size: 1.2 KB

Versions: 948

Compression:

Stored size: 1.2 KB

Contents

import React from "react"
import { AdvancedTable } from "playbook-ui"
import MOCK_DATA from "./advanced_table_mock_data.json"

const AdvancedTableTableOptions = (props) => {
  const columnDefinitions = [
    {
      accessor: "year",
      label: "Year",
      cellAccessors: ["quarter", "month", "day"],
    },
    {
      accessor: "newEnrollments",
      label: "New Enrollments",
    },
    {
      accessor: "scheduledMeetings",
      label: "Scheduled Meetings",
    },
    {
      accessor: "attendanceRate",
      label: "Attendance Rate",
    },
    {
      accessor: "completedClasses",
      label: "Completed Classes",
    },
    {
      accessor: "classCompletionRate",
      label: "Class Completion Rate",
    },
    {
      accessor: "graduatedStudents",
      label: "Graduated Students",
    },
  ]

  const tableOptions = {
    initialState: {
        sorting: [
          {
            id: "year",
            desc: true,
          },
        ],
      },
  }

  return (
    <div>
      <AdvancedTable
          columnDefinitions={columnDefinitions}
          tableData={MOCK_DATA}
          tableOptions={tableOptions}
          {...props}
      />
    </div>
  )
}

export default AdvancedTableTableOptions

Version data entries

948 entries across 948 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5340 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5340 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5339 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5339 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.12.0.pre.rc.3 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.12.0.pre.rc.3 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.12.0.pre.rc.2 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.12.0.pre.rc.2 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.12.0.pre.rc.1 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.12.0.pre.rc.1 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.12.0.pre.rc.0 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.12.0.pre.rc.0 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5315 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5315 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5314 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5314 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.10.0.pre.alpha.PLAY1750pbcontenttagkitbutton5308 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.10.0.pre.alpha.PLAY1750pbcontenttagkitbutton5308 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.0.pre.rc.17 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx