playbook_ui_docs 14.15.0.pre.alpha.play1949lodashremoval3of36758 → 14.15.0.pre.alpha.play1949lodashremoval3of36815
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +3 -0
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +67 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +67 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.html.erb +10 -4
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.jsx +49 -24
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_click.jsx +13 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled.html.erb +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.html.erb +76 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.jsx +94 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.html.erb +75 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.jsx +93 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.md +3 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.html.erb +75 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.jsx +93 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.md +3 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.html.erb +74 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.jsx +92 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.md +3 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +72 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +97 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +71 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +91 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +14 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +6 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.html.erb +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.jsx +23 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.html.erb +22 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +40 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_rails.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_react.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 786c690cd86b0d5ac37ebe71cd5a9a27a7473de5167b28a5ef7b5893a8aba15a
|
4
|
+
data.tar.gz: a78f3e7e5536c1661693c210652c6833f5aeb2c8368f5b928ffeb4b12c5f498b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d3f865f8df0d37a33ec07c0bb12c9a2df6005de007bcfd80bd32bee0a2f6db711e300e0621de0e18fe3230268241f63a97df6f84eb6ae11b68a0c68c9618713
|
7
|
+
data.tar.gz: 83910c7aad4c9d789538e4b699c633a8a505e27119fe2d007a12b2ea257cbb8b68559d0fcc5455e2892f9b0c11cbf25ce2d8e770a37cdccddc61b73277d6a21c
|
@@ -0,0 +1,3 @@
|
|
1
|
+
|
2
|
+
<%= pb_rails("body", props: { text: " The breakpoint prop determines when the Drawer is always visible. Above the specified breakpoint, the Drawer remains open on the page. Below it, only the trigger element is shown, allowing you to toggle the drawer open and closed. To see this in action, click the button below and resize your window.", padding_bottom: "md" }) %>
|
3
|
+
<%= pb_rails("button", props: { text: "Open Doc Example in New Tab", new_window: true, link: "/drawer_page", margin_right: "lg" }) %>
|
@@ -22,6 +22,72 @@
|
|
22
22
|
|
23
23
|
%>
|
24
24
|
|
25
|
+
<% treeData = [{
|
26
|
+
label: "Power Home Remodeling",
|
27
|
+
value: "Power Home Remodeling",
|
28
|
+
id: "100",
|
29
|
+
expanded: true,
|
30
|
+
children: [
|
31
|
+
{
|
32
|
+
label: "People",
|
33
|
+
value: "People",
|
34
|
+
id: "101",
|
35
|
+
expanded: true,
|
36
|
+
children: [
|
37
|
+
{
|
38
|
+
label: "Talent Acquisition",
|
39
|
+
value: "Talent Acquisition",
|
40
|
+
id: "102",
|
41
|
+
},
|
42
|
+
{
|
43
|
+
label: "Business Affairs",
|
44
|
+
value: "Business Affairs",
|
45
|
+
id: "103",
|
46
|
+
children: [
|
47
|
+
{
|
48
|
+
label: "Initiatives",
|
49
|
+
value: "Initiatives",
|
50
|
+
id: "104",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
label: "Learning & Development",
|
54
|
+
value: "Learning & Development",
|
55
|
+
id: "105",
|
56
|
+
},
|
57
|
+
],
|
58
|
+
},
|
59
|
+
{
|
60
|
+
label: "People Experience",
|
61
|
+
value: "People Experience",
|
62
|
+
id: "106",
|
63
|
+
},
|
64
|
+
],
|
65
|
+
},
|
66
|
+
{
|
67
|
+
label: "Contact Center",
|
68
|
+
value: "Contact Center",
|
69
|
+
id: "107",
|
70
|
+
children: [
|
71
|
+
{
|
72
|
+
label: "Appointment Management",
|
73
|
+
value: "Appointment Management",
|
74
|
+
id: "108",
|
75
|
+
},
|
76
|
+
{
|
77
|
+
label: "Customer Service",
|
78
|
+
value: "Customer Service",
|
79
|
+
id: "109",
|
80
|
+
},
|
81
|
+
{
|
82
|
+
label: "Energy",
|
83
|
+
value: "Energy",
|
84
|
+
id: "110",
|
85
|
+
},
|
86
|
+
],
|
87
|
+
},
|
88
|
+
],
|
89
|
+
}] %>
|
90
|
+
|
25
91
|
<%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
|
26
92
|
<%= form.typeahead :example_typeahead, props: { data: { typeahead_example1: true, user: {} }, label: true, placeholder: "Search for a user" } %>
|
27
93
|
<%= form.text_field :example_text_field, props: { label: true } %>
|
@@ -47,6 +113,7 @@
|
|
47
113
|
<%= form.date_picker :example_date_picker_1, props: { label: true } %>
|
48
114
|
<%= form.star_rating_field :example_star_rating, props: { variant: "interactive", label: true } %>
|
49
115
|
<%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true } %>
|
116
|
+
<%= form.multi_level_select :example_multi_level_select, props: { id: "multi-level-select-form-default", tree_data: treeData, margin_bottom: "sm", label: "Example Multi Level Select field" } %>
|
50
117
|
|
51
118
|
<%= form.actions do |action| %>
|
52
119
|
<%= action.submit %>
|
@@ -21,6 +21,72 @@
|
|
21
21
|
]
|
22
22
|
%>
|
23
23
|
|
24
|
+
<% treeData = [{
|
25
|
+
label: "Power Home Remodeling",
|
26
|
+
value: "Power Home Remodeling",
|
27
|
+
id: "100",
|
28
|
+
expanded: true,
|
29
|
+
children: [
|
30
|
+
{
|
31
|
+
label: "People",
|
32
|
+
value: "People",
|
33
|
+
id: "101",
|
34
|
+
expanded: true,
|
35
|
+
children: [
|
36
|
+
{
|
37
|
+
label: "Talent Acquisition",
|
38
|
+
value: "Talent Acquisition",
|
39
|
+
id: "102",
|
40
|
+
},
|
41
|
+
{
|
42
|
+
label: "Business Affairs",
|
43
|
+
value: "Business Affairs",
|
44
|
+
id: "103",
|
45
|
+
children: [
|
46
|
+
{
|
47
|
+
label: "Initiatives",
|
48
|
+
value: "Initiatives",
|
49
|
+
id: "104",
|
50
|
+
},
|
51
|
+
{
|
52
|
+
label: "Learning & Development",
|
53
|
+
value: "Learning & Development",
|
54
|
+
id: "105",
|
55
|
+
},
|
56
|
+
],
|
57
|
+
},
|
58
|
+
{
|
59
|
+
label: "People Experience",
|
60
|
+
value: "People Experience",
|
61
|
+
id: "106",
|
62
|
+
},
|
63
|
+
],
|
64
|
+
},
|
65
|
+
{
|
66
|
+
label: "Contact Center",
|
67
|
+
value: "Contact Center",
|
68
|
+
id: "107",
|
69
|
+
children: [
|
70
|
+
{
|
71
|
+
label: "Appointment Management",
|
72
|
+
value: "Appointment Management",
|
73
|
+
id: "108",
|
74
|
+
},
|
75
|
+
{
|
76
|
+
label: "Customer Service",
|
77
|
+
value: "Customer Service",
|
78
|
+
id: "109",
|
79
|
+
},
|
80
|
+
{
|
81
|
+
label: "Energy",
|
82
|
+
value: "Energy",
|
83
|
+
id: "110",
|
84
|
+
},
|
85
|
+
],
|
86
|
+
},
|
87
|
+
],
|
88
|
+
}] %>
|
89
|
+
|
24
90
|
<%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
|
25
91
|
<%= form.typeahead :example_typeahead_validation, props: { data: { typeahead_example2: true, user: {} }, label: true, placeholder: "Search for a user", required: true, validation: { message: "Please select a user." } } %>
|
26
92
|
<%= form.text_field :example_text_field_validation, props: { label: true, required: true } %>
|
@@ -38,6 +104,7 @@
|
|
38
104
|
<%= form.date_picker :example_date_picker_2, props: { label: true, required: true, validation_message: "Please, select a date.", allow_input: true } %>
|
39
105
|
<%= form.star_rating_field :example_star_rating_validation, props: { variant: "interactive", label: true, required: true } %>
|
40
106
|
<%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true, blank_selection: "Select a Time Zone...", required: true } %>
|
107
|
+
<%= form.multi_level_select :example_multi_level_select, props: { id: "multi-level-select-form", tree_data: treeData, margin_bottom: "sm", required: true, label: "Example Multi Level Select field" } %>
|
41
108
|
|
42
109
|
<%= form.actions do |action| %>
|
43
110
|
<%= action.submit %>
|
@@ -1,5 +1,11 @@
|
|
1
|
-
<%= pb_rails("flex", props: {
|
2
|
-
<%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "primary",
|
3
|
-
<%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "data_4",
|
1
|
+
<%= pb_rails("flex", props: { margin_bottom: "sm" }) do %>
|
2
|
+
<%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "primary", size: "2x" }) %>
|
3
|
+
<%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "data_4", size: "2x" }) %>
|
4
4
|
<%= pb_rails("icon", props: { icon: "roofing", fixed_width: true, color: "product_5_background", size: "2x" }) %>
|
5
|
-
<% end %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= pb_rails("flex", props: {}) do %>
|
8
|
+
<%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "light", size: "2x" }) %>
|
9
|
+
<%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "lighter", size: "2x" }) %>
|
10
|
+
<%= pb_rails("icon", props: { icon: "roofing", fixed_width: true, color: "link", size: "2x" }) %>
|
11
|
+
<% end %>
|
@@ -1,32 +1,57 @@
|
|
1
1
|
import React from "react"
|
2
2
|
import Icon from "../_icon"
|
3
|
+
import Flex from "../../pb_flex/_flex"
|
3
4
|
|
4
5
|
const IconDefault = (props) => {
|
5
6
|
return (
|
6
|
-
<div
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
7
|
+
<div>
|
8
|
+
<Flex marginBottom="sm">
|
9
|
+
<Icon
|
10
|
+
color="primary"
|
11
|
+
fixedWidth
|
12
|
+
icon="user"
|
13
|
+
size="2x"
|
14
|
+
{...props}
|
15
|
+
/>
|
16
|
+
<Icon
|
17
|
+
color="data_4"
|
18
|
+
fixedWidth
|
19
|
+
icon="recycle"
|
20
|
+
size="2x"
|
21
|
+
{...props}
|
22
|
+
/>
|
23
|
+
<Icon
|
24
|
+
color="product_5_background"
|
25
|
+
fixedWidth
|
26
|
+
icon="product-roofing"
|
27
|
+
size="2x"
|
28
|
+
{...props}
|
29
|
+
/>
|
30
|
+
</Flex>
|
31
|
+
|
32
|
+
<Flex>
|
33
|
+
<Icon
|
34
|
+
color="light"
|
35
|
+
fixedWidth
|
36
|
+
icon="user"
|
37
|
+
size="2x"
|
38
|
+
{...props}
|
39
|
+
/>
|
40
|
+
<Icon
|
41
|
+
color="lighter"
|
42
|
+
fixedWidth
|
43
|
+
icon="recycle"
|
44
|
+
size="2x"
|
45
|
+
{...props}
|
46
|
+
/>
|
47
|
+
<Icon
|
48
|
+
color="link"
|
49
|
+
fixedWidth
|
50
|
+
icon="product-roofing"
|
51
|
+
size="2x"
|
52
|
+
{...props}
|
53
|
+
/>
|
54
|
+
</Flex>
|
30
55
|
</div>
|
31
56
|
)
|
32
57
|
}
|
data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.html.erb
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
<% treeData = [{
|
2
|
+
label: "Power Home Remodeling",
|
3
|
+
value: "Power Home Remodeling",
|
4
|
+
id: "powerhome1",
|
5
|
+
expanded: true,
|
6
|
+
children: [
|
7
|
+
{
|
8
|
+
label: "People",
|
9
|
+
value: "People",
|
10
|
+
id: "people1",
|
11
|
+
expanded: true,
|
12
|
+
children: [
|
13
|
+
{
|
14
|
+
label: "Talent Acquisition",
|
15
|
+
value: "Talent Acquisition",
|
16
|
+
id: "talent1",
|
17
|
+
disabled: true,
|
18
|
+
},
|
19
|
+
{
|
20
|
+
label: "Business Affairs",
|
21
|
+
value: "Business Affairs",
|
22
|
+
id: "business1",
|
23
|
+
children: [
|
24
|
+
{
|
25
|
+
label: "Initiatives",
|
26
|
+
value: "Initiatives",
|
27
|
+
id: "initiative1",
|
28
|
+
disabled: true,
|
29
|
+
},
|
30
|
+
{
|
31
|
+
label: "Learning & Development",
|
32
|
+
value: "Learning & Development",
|
33
|
+
id: "development1",
|
34
|
+
},
|
35
|
+
],
|
36
|
+
},
|
37
|
+
{
|
38
|
+
label: "People Experience",
|
39
|
+
value: "People Experience",
|
40
|
+
id: "experience1",
|
41
|
+
},
|
42
|
+
],
|
43
|
+
},
|
44
|
+
{
|
45
|
+
label: "Contact Center",
|
46
|
+
value: "Contact Center",
|
47
|
+
id: "contact1",
|
48
|
+
children: [
|
49
|
+
{
|
50
|
+
label: "Appointment Management",
|
51
|
+
value: "Appointment Management",
|
52
|
+
id: "appointment1",
|
53
|
+
},
|
54
|
+
{
|
55
|
+
label: "Customer Service",
|
56
|
+
value: "Customer Service",
|
57
|
+
id: "customer1",
|
58
|
+
disabled: true,
|
59
|
+
},
|
60
|
+
{
|
61
|
+
label: "Energy",
|
62
|
+
value: "Energy",
|
63
|
+
id: "energy1",
|
64
|
+
},
|
65
|
+
],
|
66
|
+
},
|
67
|
+
],
|
68
|
+
}] %>
|
69
|
+
|
70
|
+
|
71
|
+
<%= pb_rails("multi_level_select", props: {
|
72
|
+
id: "multi-level-select-disabled-options-rails",
|
73
|
+
name: "disabled_options",
|
74
|
+
return_all_selected: true,
|
75
|
+
tree_data: treeData
|
76
|
+
}) %>
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import MultiLevelSelect from "../_multi_level_select";
|
3
|
+
|
4
|
+
const treeData = [
|
5
|
+
{
|
6
|
+
label: "Power Home Remodeling",
|
7
|
+
value: "Power Home Remodeling",
|
8
|
+
id: "powerhome1",
|
9
|
+
expanded: true,
|
10
|
+
children: [
|
11
|
+
{
|
12
|
+
label: "People",
|
13
|
+
value: "People",
|
14
|
+
id: "people1",
|
15
|
+
expanded: true,
|
16
|
+
children: [
|
17
|
+
{
|
18
|
+
label: "Talent Acquisition",
|
19
|
+
value: "Talent Acquisition",
|
20
|
+
id: "talent1",
|
21
|
+
disabled: true,
|
22
|
+
},
|
23
|
+
{
|
24
|
+
label: "Business Affairs",
|
25
|
+
value: "Business Affairs",
|
26
|
+
id: "business1",
|
27
|
+
children: [
|
28
|
+
{
|
29
|
+
label: "Initiatives",
|
30
|
+
value: "Initiatives",
|
31
|
+
id: "initiative1",
|
32
|
+
disabled: true,
|
33
|
+
},
|
34
|
+
{
|
35
|
+
label: "Learning & Development",
|
36
|
+
value: "Learning & Development",
|
37
|
+
id: "development1",
|
38
|
+
},
|
39
|
+
],
|
40
|
+
},
|
41
|
+
{
|
42
|
+
label: "People Experience",
|
43
|
+
value: "People Experience",
|
44
|
+
id: "experience1",
|
45
|
+
},
|
46
|
+
],
|
47
|
+
},
|
48
|
+
{
|
49
|
+
label: "Contact Center",
|
50
|
+
value: "Contact Center",
|
51
|
+
id: "contact1",
|
52
|
+
children: [
|
53
|
+
{
|
54
|
+
label: "Appointment Management",
|
55
|
+
value: "Appointment Management",
|
56
|
+
id: "appointment1",
|
57
|
+
},
|
58
|
+
{
|
59
|
+
label: "Customer Service",
|
60
|
+
value: "Customer Service",
|
61
|
+
id: "customer1",
|
62
|
+
disabled: true,
|
63
|
+
},
|
64
|
+
{
|
65
|
+
label: "Energy",
|
66
|
+
value: "Energy",
|
67
|
+
id: "energy1",
|
68
|
+
},
|
69
|
+
],
|
70
|
+
},
|
71
|
+
],
|
72
|
+
},
|
73
|
+
];
|
74
|
+
|
75
|
+
const MultiLevelSelectDisabledOptions = (props) => {
|
76
|
+
return (
|
77
|
+
<div>
|
78
|
+
<MultiLevelSelect
|
79
|
+
id='multiselect-disabled-options'
|
80
|
+
onSelect={(selectedNodes) =>
|
81
|
+
console.log(
|
82
|
+
"Selected Items",
|
83
|
+
selectedNodes
|
84
|
+
)
|
85
|
+
}
|
86
|
+
returnAllSelected
|
87
|
+
treeData={treeData}
|
88
|
+
{...props}
|
89
|
+
/>
|
90
|
+
</div>
|
91
|
+
)
|
92
|
+
};
|
93
|
+
|
94
|
+
export default MultiLevelSelectDisabledOptions;
|
@@ -0,0 +1 @@
|
|
1
|
+
individual items can also be disabled by including the `disabled:true` within the object on the treeData for the `returnAllSelected`/`return_all_selected` variant. As noted above, this variant will return data on all checked nodes from the dropdown, irrespective of whether it is a parent or child node.
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<% treeData = [{
|
2
|
+
label: "Power Home Remodeling",
|
3
|
+
value: "Power Home Remodeling",
|
4
|
+
id: "powerhome1",
|
5
|
+
expanded: true,
|
6
|
+
children: [
|
7
|
+
{
|
8
|
+
label: "People",
|
9
|
+
value: "People",
|
10
|
+
id: "people1",
|
11
|
+
expanded: true,
|
12
|
+
children: [
|
13
|
+
{
|
14
|
+
label: "Talent Acquisition",
|
15
|
+
value: "Talent Acquisition",
|
16
|
+
id: "talent1",
|
17
|
+
disabled: true,
|
18
|
+
},
|
19
|
+
{
|
20
|
+
label: "Business Affairs",
|
21
|
+
value: "Business Affairs",
|
22
|
+
id: "business1",
|
23
|
+
children: [
|
24
|
+
{
|
25
|
+
label: "Initiatives",
|
26
|
+
value: "Initiatives",
|
27
|
+
id: "initiative1",
|
28
|
+
disabled: true,
|
29
|
+
},
|
30
|
+
{
|
31
|
+
label: "Learning & Development",
|
32
|
+
value: "Learning & Development",
|
33
|
+
id: "development1",
|
34
|
+
},
|
35
|
+
],
|
36
|
+
},
|
37
|
+
{
|
38
|
+
label: "People Experience",
|
39
|
+
value: "People Experience",
|
40
|
+
id: "experience1",
|
41
|
+
},
|
42
|
+
],
|
43
|
+
},
|
44
|
+
{
|
45
|
+
label: "Contact Center",
|
46
|
+
value: "Contact Center",
|
47
|
+
id: "contact1",
|
48
|
+
children: [
|
49
|
+
{
|
50
|
+
label: "Appointment Management",
|
51
|
+
value: "Appointment Management",
|
52
|
+
id: "appointment1",
|
53
|
+
},
|
54
|
+
{
|
55
|
+
label: "Customer Service",
|
56
|
+
value: "Customer Service",
|
57
|
+
id: "customer1",
|
58
|
+
disabled: true,
|
59
|
+
},
|
60
|
+
{
|
61
|
+
label: "Energy",
|
62
|
+
value: "Energy",
|
63
|
+
id: "energy1",
|
64
|
+
},
|
65
|
+
],
|
66
|
+
},
|
67
|
+
],
|
68
|
+
}] %>
|
69
|
+
|
70
|
+
|
71
|
+
<%= pb_rails("multi_level_select", props: {
|
72
|
+
id: "multi-level-select-disabled-options-default-rails",
|
73
|
+
name: "disabled_options_default",
|
74
|
+
tree_data: treeData
|
75
|
+
}) %>
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import MultiLevelSelect from "../_multi_level_select";
|
3
|
+
|
4
|
+
const treeData = [
|
5
|
+
{
|
6
|
+
label: "Power Home Remodeling",
|
7
|
+
value: "Power Home Remodeling",
|
8
|
+
id: "powerhome1",
|
9
|
+
expanded: true,
|
10
|
+
children: [
|
11
|
+
{
|
12
|
+
label: "People",
|
13
|
+
value: "People",
|
14
|
+
id: "people1",
|
15
|
+
expanded: true,
|
16
|
+
children: [
|
17
|
+
{
|
18
|
+
label: "Talent Acquisition",
|
19
|
+
value: "Talent Acquisition",
|
20
|
+
id: "talent1",
|
21
|
+
disabled: true,
|
22
|
+
},
|
23
|
+
{
|
24
|
+
label: "Business Affairs",
|
25
|
+
value: "Business Affairs",
|
26
|
+
id: "business1",
|
27
|
+
children: [
|
28
|
+
{
|
29
|
+
label: "Initiatives",
|
30
|
+
value: "Initiatives",
|
31
|
+
id: "initiative1",
|
32
|
+
disabled: true,
|
33
|
+
},
|
34
|
+
{
|
35
|
+
label: "Learning & Development",
|
36
|
+
value: "Learning & Development",
|
37
|
+
id: "development1",
|
38
|
+
},
|
39
|
+
],
|
40
|
+
},
|
41
|
+
{
|
42
|
+
label: "People Experience",
|
43
|
+
value: "People Experience",
|
44
|
+
id: "experience1",
|
45
|
+
},
|
46
|
+
],
|
47
|
+
},
|
48
|
+
{
|
49
|
+
label: "Contact Center",
|
50
|
+
value: "Contact Center",
|
51
|
+
id: "contact1",
|
52
|
+
children: [
|
53
|
+
{
|
54
|
+
label: "Appointment Management",
|
55
|
+
value: "Appointment Management",
|
56
|
+
id: "appointment1",
|
57
|
+
},
|
58
|
+
{
|
59
|
+
label: "Customer Service",
|
60
|
+
value: "Customer Service",
|
61
|
+
id: "customer1",
|
62
|
+
disabled: true,
|
63
|
+
},
|
64
|
+
{
|
65
|
+
label: "Energy",
|
66
|
+
value: "Energy",
|
67
|
+
id: "energy1",
|
68
|
+
},
|
69
|
+
],
|
70
|
+
},
|
71
|
+
],
|
72
|
+
},
|
73
|
+
];
|
74
|
+
|
75
|
+
const MultiLevelSelectDisabledOptionsDefault = (props) => {
|
76
|
+
return (
|
77
|
+
<div>
|
78
|
+
<MultiLevelSelect
|
79
|
+
id='multiselect-disabled-options-default'
|
80
|
+
onSelect={(selectedNodes) =>
|
81
|
+
console.log(
|
82
|
+
"Selected Items",
|
83
|
+
selectedNodes
|
84
|
+
)
|
85
|
+
}
|
86
|
+
treeData={treeData}
|
87
|
+
{...props}
|
88
|
+
/>
|
89
|
+
</div>
|
90
|
+
)
|
91
|
+
};
|
92
|
+
|
93
|
+
export default MultiLevelSelectDisabledOptionsDefault;
|
data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.md
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
To disable individual items in the treeData, include `disabled:true` within the object on the treeData that you want disabled. See the code snippet below for an example of how to do this.
|
2
|
+
|
3
|
+
If a parent is selected, the parent will be returned in the selected items list, even if it has disabled children.
|