Sha256: dad5d2126ea5f2f5cdc0059996f840bb5cf58ba739eb0311cbd1b71e3043dc3f

Contents?: true

Size: 1.19 KB

Versions: 4

Compression:

Stored size: 1.19 KB

Contents

import React from "react"
import { AdvancedTable } from "playbook-ui"
import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"

const AdvancedTablePaginationWithProps = (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 paginationProps = {
    pageIndex: 1,
    pageSize: 10,
    range: 2
  }
  
  return (
    <>
      <AdvancedTable
          columnDefinitions={columnDefinitions}
          pagination
          paginationProps={paginationProps}
          tableData={PAGINATION_MOCK_DATA}
          {...props}
      />
    </>
  )
}

export default AdvancedTablePaginationWithProps

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
playbook_ui_docs-14.10.0.pre.rc.1 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
playbook_ui-14.10.0.pre.rc.1 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
playbook_ui_docs-14.9.0.pre.alpha.PBNTR686advancedtablepaginationpoc4747 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
playbook_ui-14.9.0.pre.alpha.PBNTR686advancedtablepaginationpoc4747 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx