playbook_ui_docs 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4037 → 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4077

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: 86fe8c7c1273c7352e4d59656aef0b201b8cf9458ccfe883790531310a899b2e
4
- data.tar.gz: 2398d6e9f5c16b0435f647810ed81dac2d3bef77da425618255bd3ea71fce884
3
+ metadata.gz: 023c7d0d1b7b60c99fc7d498cc623ad011939c8d159b4f7e0273452554ae281a
4
+ data.tar.gz: b6895dfcf94b2ccb86f5e8d48929de5d093f50780f352cffb531bb3929a6a243
5
5
  SHA512:
6
- metadata.gz: 1771c342bc8529b6afdcfd795ae6bec18ad17c8df563235d5e886a4a3df62ed62aa5019d084ca62c6bc2adbeac8c871ca7e2da0f6caa455d232624eb3d50f378
7
- data.tar.gz: 04f03f2300b47de626c3c70c66ca0cef68c5646f8c097d8d39bde01f1c2820ed944e3c502c13f620ae7165d30c0304a11574a5fa6caf339f10103dca5cde9bc3
6
+ metadata.gz: 618f0cfcab6553eff5682597bb9dad76bb1224628c246db143844dca2c4b01aae0c4687c342f9e374c3c2a07fcfa795e6fc649dc1c872ffef51150018c93f19e
7
+ data.tar.gz: 29dec1c961a385eded51856b6b73627af9994cc3002c85b40d0f8b01bd51225ddfbab08b0267915259db5bb1fff330ed8629c1de310bb6e2acf1e724332864a5
@@ -0,0 +1,93 @@
1
+ <% treeData = [{
2
+ label: "Power Home Remodeling",
3
+ value: "Power Home Remodeling",
4
+ id: "100",
5
+ expanded: true,
6
+ children: [
7
+ {
8
+ label: "People",
9
+ value: "People",
10
+ id: "101",
11
+ expanded: true,
12
+ children: [
13
+ {
14
+ label: "Talent Acquisition",
15
+ value: "Talent Acquisition",
16
+ id: "102",
17
+ },
18
+ {
19
+ label: "Business Affairs",
20
+ value: "Business Affairs",
21
+ id: "103",
22
+ children: [
23
+ {
24
+ label: "Initiatives",
25
+ value: "Initiatives",
26
+ id: "104",
27
+ },
28
+ {
29
+ label: "Learning & Development",
30
+ value: "Learning & Development",
31
+ id: "105",
32
+ },
33
+ ],
34
+ },
35
+ {
36
+ label: "People Experience",
37
+ value: "People Experience",
38
+ id: "106",
39
+ },
40
+ ],
41
+ },
42
+ {
43
+ label: "Contact Center",
44
+ value: "Contact Center",
45
+ id: "107",
46
+ children: [
47
+ {
48
+ label: "Appointment Management",
49
+ value: "Appointment Management",
50
+ id: "108",
51
+ },
52
+ {
53
+ label: "Customer Service",
54
+ value: "Customer Service",
55
+ id: "109",
56
+ },
57
+ {
58
+ label: "Energy",
59
+ value: "Energy",
60
+ id: "110",
61
+ },
62
+ ],
63
+ },
64
+ ],
65
+ }] %>
66
+
67
+ <%= pb_rails("multi_level_select", props: {
68
+ id: "multi-level-select-reset-example",
69
+ name: "my_array",
70
+ tree_data: treeData,
71
+ return_all_selected: true
72
+ }) %>
73
+
74
+ <%= pb_rails("button", props: { text: "Reset", margin_top: "lg", id:"multilevelselect-reset-button" }) %>
75
+
76
+
77
+ <script>
78
+ window.addEventListener('DOMContentLoaded', () => {
79
+ const exampleResetButton = document.querySelector("#multilevelselect-reset-button");
80
+
81
+ exampleResetButton.addEventListener("click", () => {
82
+ clearMultiLevelSelectById('multi-level-select-reset-example');
83
+ });
84
+ function clearMultiLevelSelectById(id) {
85
+ const clearFunction = window[`clearMultiLevelSelect_${id}`];
86
+ if (clearFunction) {
87
+ clearFunction();
88
+ } else {
89
+ console.warn(`No clear function found for MultiLevelSelect with id: ${id}`);
90
+ }
91
+ }
92
+ })
93
+ </script>
@@ -0,0 +1 @@
1
+ In order to clear the multilevelselect selection using an external trigger (like a reset button), the `clearMultiLevelSelect` function can be used. See the code snippet below to see this in action. The function is scoped by id so an id MUST be used on the multilevelselect kit and passed to the function as shown for it to work.
@@ -7,6 +7,7 @@ examples:
7
7
  - multi_level_select_selected_ids: Selected Ids
8
8
  - multi_level_select_with_form: With Form
9
9
  - multi_level_select_color: With Pills (Custom Color)
10
+ - multi_level_select_reset: Reset Selection
10
11
 
11
12
  react:
12
13
  - multi_level_select_default: Default