playbook_ui_docs 14.9.0.pre.alpha.pbntr700newresettodefaultprop4736 → 14.9.0.pre.alpha.play1703errorstatealignment4889

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: 5919b5e54cea8382d0c3e75f48f10d2332ffd2c933bcb5530e9246e55d69f930
4
- data.tar.gz: 17502d32d2992da54fe67d9689a8a5f395e6ccc5172725a8a28a2e54efd06d75
3
+ metadata.gz: f7f29e70760c2884a9d873f33abb639029cba5211794a3b7204a2c9ce130b525
4
+ data.tar.gz: 0ae3f331a9c4f17f5e4d864853f0a3aed9ed29c4a50836fd55e2ae5b1eca964c
5
5
  SHA512:
6
- metadata.gz: 8494d5893ca61cad7f55fe8fd505506ed3f3b757c823c2be7757875dcacbacff18ce5edd573a6933b19daf331ce8bcf2a480525d9d77808d94c3adc1e69f4b7c
7
- data.tar.gz: 1419f7d34fac7c22c04eca45ff4fb9bf8fd104ed45797a52d1ca2f4035bde4e5d56d435ccf15ebdbbd009529bf447b3a9171bd8b91535b8e8d7ff0bc9d81f0e6
6
+ metadata.gz: 3266bad6029a5160c35f223ce860bb513f4bd8690b2a19c09fc10ced020341077f01fd9fa34e41d8868d8611c469aae672c2bdb29e2d57089ff78f35af0e703e
7
+ data.tar.gz: e6abd41cfdde709d1a148ec1d21480dae28ff5cdd72452e36a3aac3909dee85e9659c4fe2e1e9cece83b759c46daa675e6015b8b86bd61d36e5c868d1e8f4f4f
@@ -0,0 +1,50 @@
1
+ import React from "react"
2
+ import { AdvancedTable } from "playbook-ui"
3
+ import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
4
+
5
+ const AdvancedTablePagination = (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
+ return (
39
+ <>
40
+ <AdvancedTable
41
+ columnDefinitions={columnDefinitions}
42
+ pagination
43
+ tableData={PAGINATION_MOCK_DATA}
44
+ {...props}
45
+ />
46
+ </>
47
+ )
48
+ }
49
+
50
+ export default AdvancedTablePagination
@@ -0,0 +1 @@
1
+ `pagination` is an optional prop that can be used to add pagination to the AdvancedTable. If present, it will add pagination with default values for pageSize, etc. To customize pagination, you can also use `paginationProps` shown in the next example.
@@ -0,0 +1,57 @@
1
+ import React from "react"
2
+ import { AdvancedTable } from "playbook-ui"
3
+ import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
4
+
5
+ const AdvancedTablePaginationWithProps = (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
+ const paginationProps = {
39
+ pageIndex: 1,
40
+ pageSize: 10,
41
+ range: 2
42
+ }
43
+
44
+ return (
45
+ <>
46
+ <AdvancedTable
47
+ columnDefinitions={columnDefinitions}
48
+ pagination
49
+ paginationProps={paginationProps}
50
+ tableData={PAGINATION_MOCK_DATA}
51
+ {...props}
52
+ />
53
+ </>
54
+ )
55
+ }
56
+
57
+ export default AdvancedTablePaginationWithProps
@@ -0,0 +1,5 @@
1
+ `paginationProps` is an optional prop that can be used to further customize pagination for the AdvancedTable. This prop is an object with 2 optional items:
2
+
3
+ - `pageIndex`: An optional prop to set which page is set to open on initial load. Default is '0'
4
+ - `pageSize`: An optional prop to set total number of rows for each page before the Table paginates. Default is '20'
5
+ - `range`: The range prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the range prop. See [here for more details](https://playbook.powerapp.cloud/kits/pagination/react#default). Default is set to '5'