playbook_ui_docs 14.21.2 → 14.22.0.pre.rc.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9405f31a27844f27804b22e9f155bedd90ad625774877f925a3c02b461930d6e
4
- data.tar.gz: 1de767071ea6b45fedd73e4e73d9bd701fc2ee6c29332cd20a6bdc1514ea5a7c
3
+ metadata.gz: e1635595dd451721606fad3a04cc19b0e102b028d6331a609c495edc3d4f0939
4
+ data.tar.gz: 69a18237df5e5e948ff6e390041a6657dae90dcd5ed0003c9fd7373edf344705
5
5
  SHA512:
6
- metadata.gz: 91d5c6d8364aa43ac0bc697ae7ee82d99f03d564b21c4318a17bf96b7b56ecb6a18cec06dcbdb94a420a7208995d8e94f43cade2ddcb84e6ac7c90a8bf52a0d2
7
- data.tar.gz: 91f13104947d7ef99ddfe3794de30919b2f95c8e8b73a10fbfa7f126e656e6daa90ef7aab24219ad031b42ea0f292e524d849784719a2d973a1517307aefb117
6
+ metadata.gz: ede63dba2edc03bb57b5ad68ba79277b198eb29216eb3d18a4d85dbb2e799a0a73bb82f67befd259bb37ddb334b96b64019a915bd22fb03bc60ea26f6d72af59
7
+ data.tar.gz: 5a27599269abf566ead007a16b9bdce1908a20f25daf30f4a6f2214685133fc06048ac705dc2cafb724ad0f807d07c2a0360b81814035808db8b654f0b984c0d
@@ -0,0 +1,42 @@
1
+ import React from 'react'
2
+ import Dropdown from '../../pb_dropdown/_dropdown'
3
+
4
+ const DropdownCloseOnSelect = (props) => {
5
+
6
+ const options = [
7
+ {
8
+ label: "United States",
9
+ value: "United States",
10
+ },
11
+ {
12
+ label: "Canada",
13
+ value: "Canada",
14
+ },
15
+ {
16
+ label: "Pakistan",
17
+ value: "Pakistan",
18
+ }
19
+ ];
20
+
21
+
22
+ return (
23
+ <div>
24
+ <Dropdown
25
+ closeOnSelection={false}
26
+ label="Default"
27
+ options={options}
28
+ {...props}
29
+ />
30
+ <br />
31
+ <Dropdown
32
+ closeOnSelection={false}
33
+ label="Multi Select"
34
+ multiSelect
35
+ options={options}
36
+ {...props}
37
+ />
38
+ </div>
39
+ )
40
+ }
41
+
42
+ export default DropdownCloseOnSelect
@@ -0,0 +1 @@
1
+ By default, the dropdown menu will close when a selection is made. You can prevent this behavior by using the `closeOnSelection` prop, which will leave the menu open after a selection is made when set to 'false'.
@@ -44,4 +44,6 @@ examples:
44
44
  - dropdown_clear_selection: Clear Selection
45
45
  - dropdown_separators_hidden: Separators Hidden
46
46
  - dropdown_with_external_control: useDropdown Hook
47
+ - dropdown_close_on_select: Close On Selection
48
+
47
49
 
@@ -19,4 +19,5 @@ export { default as DropdownMultiSelect } from './_dropdown_multi_select.jsx'
19
19
  export { default as DropdownMultiSelectDisplay } from './_dropdown_multi_select_display.jsx'
20
20
  export { default as DropdownMultiSelectWithAutocomplete } from './_dropdown_multi_select_with_autocomplete.jsx'
21
21
  export { default as DropdownMultiSelectWithDefault } from './_dropdown_multi_select_with_default.jsx'
22
- export { default as DropdownMultiSelectWithCustomOptions } from './_dropdown_multi_select_with_custom_options.jsx'
22
+ export { default as DropdownMultiSelectWithCustomOptions } from './_dropdown_multi_select_with_custom_options.jsx'
23
+ export { default as DropdownCloseOnSelect } from './_dropdown_close_on_select.jsx'