Sha256: a0a3dcd7b89acde8fc5196541262e703fbb171bba9d59a9e010efcbdcd9752e3

Contents?: true

Size: 1.23 KB

Versions: 12

Compression:

Stored size: 1.23 KB

Contents

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

const AdvancedTableSort = (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 enableSorting />
        <AdvancedTable.Body subRowHeaders={subRowHeaders} />
      </AdvancedTable>
    </div>
  );
};

export default AdvancedTableSort;

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
playbook_ui_docs-13.16.0.pre.alpha.play1141iconkitusinglibrary2107 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2107 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui_docs-13.16.0.pre.alpha.PBNTR181stripedtable2103 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR181stripedtable2103 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui_docs-13.16.0.pre.alpha.play1141iconkitusinglibrary2100 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2100 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui_docs-13.16.0.pre.alpha.PBNTR184betaflaginmenuyml2085 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR184betaflaginmenuyml2085 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui_docs-13.17.0 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui-13.17.0 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui_docs-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2035 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2035 app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx