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.PLAY1720phonenumberinputformatAsYouType5377 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1720phonenumberinputformatAsYouType5377 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.play17725374 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.play17725374 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.play17725372 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.play17725372 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.12.0.pre.rc.4 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.12.0.pre.rc.4 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.hfhbrakemanplaybook5370 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.hfhbrakemanplaybook5370 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.responsivetablerails5364 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.responsivetablerails5364 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.responsivetablerails5362 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.responsivetablerails5362 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR769sticky5359 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR769sticky5359 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR573datepickerinvestigation5355 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR573datepickerinvestigation5355 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5341 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5341 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx