playbook_ui_docs 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4073 → 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: 5886c9d647cf84c6b8a407589c1e16c285d1fa4ca0f435e46bd6d83fd26580f0
4
- data.tar.gz: ad6f2781a0f42c1f1933b7784efb7ac888c5ed1b519e83ce2b50c1fe0e6eb3a2
3
+ metadata.gz: 023c7d0d1b7b60c99fc7d498cc623ad011939c8d159b4f7e0273452554ae281a
4
+ data.tar.gz: b6895dfcf94b2ccb86f5e8d48929de5d093f50780f352cffb531bb3929a6a243
5
5
  SHA512:
6
- metadata.gz: dfec3354417189dfe0b57d9fd4b2e599c09bce1abb5cc3385097ec1587200171d0fe96aa0749333d71c95b2276784b91f5cd7cd446d76bcf2ab5aa7051d9c662
7
- data.tar.gz: 9aa15e12da2708ff78363141db2ca9cfb198e5b0c2468538f34037ec7553f8a786e20f8f93ce502201abb509ef2930996a169633ed906791a2fb3d99a21ef47a
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