playbook_ui_docs 14.11.1.pre.alpha.PBNTR573datepickerinvestigation5355 → 14.11.1.pre.alpha.PBNTR769sticky5359

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b29ced69883c08efeeb38c8cae1c7a9dca8bdb13222e9bf8b5d45a7058f20433
4
- data.tar.gz: 30714ea1e97be8ddd8766dca5ff9a7707b9cdce82bf96f1f4538070b8215e4a7
3
+ metadata.gz: f3bdb49fc5fa2ae41cef519b8fc54c5a9fa804baecf7583ef6b16d0dbd1167d4
4
+ data.tar.gz: c61ffaa7be0fb6b1421dd77dcaa4c7653006377abfc564278064e3fea0a9cf94
5
5
  SHA512:
6
- metadata.gz: 6a616895c39c34e9d17e09c7abd702f569762af4bb1aecb35632d514795ab6457077b5bf19dc3f59b800742ebf1bea9c4622c04cbdb7a4bc2e7dd75b2c257463
7
- data.tar.gz: 5ea0bfef4c19c5bbbc318cca0937330c95654dd70b36ad2dbc85008c901e2a4e980eedf6a385aa2e80edf6825c020d129659fbebb6b91fac19732856147e35e7
6
+ metadata.gz: fae106e1a12690322c17c135dd21c65cf7af1fc23ddbab77855f4d958e7afce6ee4194b9bcd1a52a2e2395d947365f5a793d1de56de09ecc2ef4f499d4059282
7
+ data.tar.gz: '078f33440cc6284dc9d29952c1d500727d7957b76a147b50af05c62d4005fc16625828295c72e361d64e1dd7cffde0f3ecd884851ca807d392595e4a4f2fef20'
@@ -0,0 +1,52 @@
1
+ import React from "react"
2
+ import { AdvancedTable } from "playbook-ui"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+
5
+ const AdvancedTableStickyHeaderResponsive = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ cellAccessors: ["quarter", "month", "day"],
11
+ },
12
+ {
13
+ accessor: "newEnrollments",
14
+ label: "New Enrollments",
15
+ },
16
+ {
17
+ accessor: "scheduledMeetings",
18
+ label: "Scheduled Meetings",
19
+ },
20
+ {
21
+ accessor: "attendanceRate",
22
+ label: "Attendance Rate",
23
+ },
24
+ {
25
+ accessor: "completedClasses",
26
+ label: "Completed Classes",
27
+ },
28
+ {
29
+ accessor: "classCompletionRate",
30
+ label: "Class Completion Rate",
31
+ },
32
+ {
33
+ accessor: "graduatedStudents",
34
+ label: "Graduated Students",
35
+ },
36
+ ]
37
+
38
+
39
+ return (
40
+ <div>
41
+ <AdvancedTable
42
+ columnDefinitions={columnDefinitions}
43
+ htmlOptions={{style: { maxHeight: "100vh" }}}
44
+ tableData={MOCK_DATA}
45
+ tableProps={{sticky:true}}
46
+ {...props}
47
+ />
48
+ </div>
49
+ )
50
+ }
51
+
52
+ export default AdvancedTableStickyHeaderResponsive
@@ -22,6 +22,7 @@ examples:
22
22
  - advanced_table_table_props: Table Props
23
23
  - advanced_table_inline_row_loading: Inline Row Loading
24
24
  - advanced_table_responsive: Responsive Tables
25
+ - advanced_table_sticky_header_responsive: Sticky Header and Responsive
25
26
  - advanced_table_custom_cell: Custom Components for Cells
26
27
  - advanced_table_pagination: Pagination
27
28
  - advanced_table_pagination_with_props: Pagination Props
@@ -13,4 +13,5 @@ export { default as AdvancedTableCustomCell } from './_advanced_table_custom_cel
13
13
  export { default as AdvancedTablePagination } from './_advanced_table_pagination.jsx'
14
14
  export { default as AdvancedTablePaginationWithProps } from './_advanced_table_pagination_with_props.jsx'
15
15
  export { default as AdvancedTableColumnHeaders } from './_advanced_table_column_headers.jsx'
16
- export { default as AdvancedTableColumnHeadersMultiple } from './_advanced_table_column_headers_multiple.jsx'
16
+ export { default as AdvancedTableColumnHeadersMultiple } from './_advanced_table_column_headers_multiple.jsx'
17
+ export { default as AdvancedTableStickyHeaderResponsive } from './_advanced_table_sticky_header_responsive.jsx'
@@ -1,12 +1 @@
1
- <%= pb_rails("date_picker", props: { picker_id: "date-picker-default", custom_event_listener: "datePickerLoader" }) %>
2
- <%= pb_rails("button", props: { id: "date-picker-loader", text: "Load Custom Event" }) %>
3
-
4
- <script>
5
- document.getElementById("date-picker-loader").addEventListener("click", () => {
6
- window.document.dispatchEvent(
7
- new CustomEvent("datePickerLoader", {
8
- bubbles: true,
9
- })
10
- );
11
- });
12
- </script>
1
+ <%= pb_rails("date_picker", props: { picker_id: "date-picker-default"}) %>