Sha256: e7e49f5df86abaeeb22c4609116aeb741e516be648144a6555b2a1b3eaccdb22

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

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

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


  return (
    <div>
      <AdvancedTable
          columnDefinitions={columnDefinitions}
          htmlOptions={{style: { maxHeight: "100vh" }}}
          tableData={MOCK_DATA}
          tableProps={{sticky:true}}
          {...props}
      />
    </div>
  )
}

export default AdvancedTableStickyHeaderResponsive

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PBNTR769sticky5359 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_responsive.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR769sticky5359 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_responsive.jsx