Sha256: 275f7940bca7ca63de9cd90a4a06d7e954ee93aea3f763018ac57946316cf600

Contents?: true

Size: 1.22 KB

Versions: 22

Compression:

Stored size: 1.22 KB

Contents

import React from "react"
import { AdvancedTable } from "../.."
import { MOCK_DATA } from "./_mock_data"

const AdvancedTableSubrowHeaders = (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",
    },
  ]

  //Render the subRow header rows
  const subRowHeaders = ["Quarter", "Month", "Day"]


  return (
    <div>
      <AdvancedTable
          columnDefinitions={columnDefinitions}
          enableToggleExpansion="all"
          tableData={MOCK_DATA}
          {...props}
      >
        <AdvancedTable.Header />
        <AdvancedTable.Body subRowHeaders={subRowHeaders}/>
      </AdvancedTable>
    </div>
  )
}

export default AdvancedTableSubrowHeaders

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
playbook_ui_docs-13.21.0.pre.alpha.PLAY12582531 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PLAY12582531 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.21.0.pre.alpha.PLAY12582516 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PLAY12582516 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.21.0.pre.alpha.PLAY12582515 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PLAY12582515 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.21.0.pre.alpha.PLAY12582514 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PLAY12582514 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.22.0 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.22.0 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.21.0.pre.alpha.PBNTR243globalpositioningpropinset2504 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PBNTR243globalpositioningpropinset2504 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.21.0.pre.alpha.PLAY12582474 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PLAY12582474 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.21.0.pre.alpha.PBNTR224letuserresetrowexpansion2466 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PBNTR224letuserresetrowexpansion2466 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.21.0.pre.alpha.PLAY120322465 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PLAY120322465 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui_docs-13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
playbook_ui-13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx