playbook_ui_docs 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4175 → 14.5.0.pre.alpha.PLAY1601updatereactzoompanpinch4123
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md +1 -1
- data/dist/playbook-doc.js +1 -1
- metadata +2 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx +0 -72
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md +0 -5
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.5.0.pre.alpha.
|
4
|
+
version: 14.5.0.pre.alpha.PLAY1601updatereactzoompanpinch4123
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-10-
|
12
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -41,8 +41,6 @@ files:
|
|
41
41
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md
|
42
42
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx
|
43
43
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
|
44
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx
|
45
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md
|
46
44
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx
|
47
45
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md
|
48
46
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx
|
@@ -1,72 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import { AdvancedTable, Pill, Body, Flex, Detail, Caption } from "playbook-ui"
|
3
|
-
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
-
|
5
|
-
const AdvancedTableCustomCell = (props) => {
|
6
|
-
const columnDefinitions = [
|
7
|
-
{
|
8
|
-
accessor: "year",
|
9
|
-
label: "Year",
|
10
|
-
cellAccessors: ["quarter", "month", "day"],
|
11
|
-
|
12
|
-
},
|
13
|
-
{
|
14
|
-
accessor: "newEnrollments",
|
15
|
-
label: "New Enrollments",
|
16
|
-
customRenderer: (row, value) => (
|
17
|
-
<Pill text={value}
|
18
|
-
variant="success"
|
19
|
-
/>
|
20
|
-
),
|
21
|
-
},
|
22
|
-
{
|
23
|
-
accessor: "scheduledMeetings",
|
24
|
-
label: "Scheduled Meetings",
|
25
|
-
customRenderer: (row, value) => <Body><a href="#">{value}</a></Body>,
|
26
|
-
},
|
27
|
-
{
|
28
|
-
accessor: "attendanceRate",
|
29
|
-
label: "Attendance Rate",
|
30
|
-
customRenderer: (row, value) => (
|
31
|
-
<Flex alignItems="end"
|
32
|
-
orientation="column"
|
33
|
-
>
|
34
|
-
<Detail bold
|
35
|
-
color="default"
|
36
|
-
text={value}
|
37
|
-
/>
|
38
|
-
<Caption size="xs">{row.original.graduatedStudents}</Caption>
|
39
|
-
</Flex>
|
40
|
-
),
|
41
|
-
},
|
42
|
-
{
|
43
|
-
accessor: "completedClasses",
|
44
|
-
label: "Completed Classes",
|
45
|
-
},
|
46
|
-
{
|
47
|
-
accessor: "classCompletionRate",
|
48
|
-
label: "Class Completion Rate",
|
49
|
-
},
|
50
|
-
{
|
51
|
-
accessor: "graduatedStudents",
|
52
|
-
label: "Graduated Students",
|
53
|
-
},
|
54
|
-
]
|
55
|
-
|
56
|
-
return (
|
57
|
-
<div>
|
58
|
-
<AdvancedTable
|
59
|
-
columnDefinitions={columnDefinitions}
|
60
|
-
enableToggleExpansion="all"
|
61
|
-
responsive="none"
|
62
|
-
tableData={MOCK_DATA}
|
63
|
-
{...props}
|
64
|
-
>
|
65
|
-
<AdvancedTable.Header enableSorting />
|
66
|
-
<AdvancedTable.Body />
|
67
|
-
</AdvancedTable>
|
68
|
-
</div>
|
69
|
-
)
|
70
|
-
}
|
71
|
-
|
72
|
-
export default AdvancedTableCustomCell
|
@@ -1,5 +0,0 @@
|
|
1
|
-
The Advanced Table also allows for rendering custom components within individual Cells. To achieve this, you can make use of the optional `customRenderer` item within each columnDefinition. This function gives you access to the current Cell's value if you just want to use that with a custom Kit, but it also gives you access to the entire `row` object. The row object provides all data for the current row. To access the data, use `row.original` which is the entire data object for the current row. See the code snippet below for 3 separate use cases and how they were acheived.
|
2
|
-
|
3
|
-
See [here](https://playbook.powerapp.cloud/kits/advanced_table/react#columnDefinitions) for more indepth information on columnDefinitions are how to use them.
|
4
|
-
|
5
|
-
See [here](https://github.com/powerhome/playbook/tree/master/playbook/app/pb_kits/playbook/pb_advanced_table#readme) for the structure of the tableData used.
|