Sha256: 319099f0f7b892252ec96f893f7c8358d44f56540232528f6dac7efb4075a814

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 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}
          responsive="none"
          tableData={PAGINATION_MOCK_DATA}
          {...props}
      />
    </>
  )
}

export default AdvancedTablePaginationWithProps

Version data entries

2 entries across 2 versions & 2 rubygems

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