playbook_ui_docs 12.37.0.pre.alpha.PLAYaddingdatapropselectkit1071 → 12.38.0.pre.alpha.PBNTR78selectkitmultipleprop1094

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: 07d96e66096935be57e79f420aaf89d1cc9c21950f6d37a8318efb9954f90d4b
4
- data.tar.gz: d10d6102fd9f8fd01a3ace6fc774fe107d20527093ba44e96a59d584353d7f90
3
+ metadata.gz: f12c91c026a23ed3fa8df39512011d79eb4807bfb313e0e1db224123042589ea
4
+ data.tar.gz: 8ba1588e199adbb9de6e86683473fded972a444d66096caa43c4585bb30004a4
5
5
  SHA512:
6
- metadata.gz: d00b5600928314488dfd4c22cf67ada2264e70a3c5b93c6c484b6037310d6ca4d5e2a859a487fa4a7d41183937c4ff47dec826fb51f6b3dcabf24d827feb669a
7
- data.tar.gz: a24856ae2b17528c04b506e7f6a18739d8702f6dda09eb54772154d326e4bcc1ecf567ffc96f3544187676c0a71c6f0cfd8eeff876762b0d66b48d4c3e5850aa
6
+ metadata.gz: 773c2337e6335e5c4798b1e01e40539e055acba614f074d9105c5a298f0a5c50e2e83aa3f20a2787d616c547cc85013409608d854e2ffeca51910d6cf6e29a49
7
+ data.tar.gz: 864e07f65b4ea5faa0ab48362381d1a14e1417c377c0b1b182c90056d300c54f30e49acae16a9f29413a294342cd47939ec6caac5b3df3c6f52b457a56c498c7
@@ -1,5 +1,7 @@
1
1
  <%= pb_rails("select", props: {
2
- data: { options: "data_attribute" },
2
+ attributes: {
3
+ data: { options: "data_attribute" },
4
+ },
3
5
  label: "Favorite Food",
4
6
  name: "food",
5
7
  options: [
@@ -0,0 +1,36 @@
1
+ <%= pb_rails("select", props: {
2
+ label: "Favorite Food",
3
+ name: "food",
4
+ multiple: true,
5
+ options: [
6
+ {
7
+ value: "1",
8
+ value_text: "Burgers",
9
+ },
10
+ {
11
+ value: "2",
12
+ selected: true,
13
+ value_text: "Pizza",
14
+ },
15
+ {
16
+ value: "3",
17
+ value_text: "Tacos",
18
+ },
19
+ {
20
+ value: "4",
21
+ value_text: "BBQ",
22
+ },
23
+ {
24
+ value: "4",
25
+ value_text: "Sushi",
26
+ },
27
+ {
28
+ value: "4",
29
+ value_text: "Chinese",
30
+ },
31
+ {
32
+ value: "4",
33
+ value_text: "Hot Dogs",
34
+ },
35
+ ]
36
+ }) %>
@@ -0,0 +1,50 @@
1
+ import React from 'react'
2
+
3
+ import Select from '../_select'
4
+
5
+ const SelectMultiple = (props) => {
6
+ const options = [
7
+ {
8
+ value: '1',
9
+ text: 'Burgers',
10
+ },
11
+ {
12
+ value: '2',
13
+ text: 'Pizza',
14
+ },
15
+ {
16
+ value: '3',
17
+ text: 'Tacos',
18
+ },
19
+ {
20
+ value: '3',
21
+ text: 'BBQ',
22
+ },
23
+ {
24
+ value: '3',
25
+ text: 'Sushi',
26
+ },
27
+ {
28
+ value: '3',
29
+ text: 'Chinese',
30
+ },
31
+ {
32
+ value: '3',
33
+ text: 'Hot Dogs',
34
+ },
35
+ ]
36
+
37
+ return (
38
+ <div>
39
+ <Select
40
+ label="Favorite Food"
41
+ multiple
42
+ name="food"
43
+ options={options}
44
+ {...props}
45
+ />
46
+ </div>
47
+ )
48
+ }
49
+
50
+ export default SelectMultiple
@@ -0,0 +1 @@
1
+ We recommend using a typeahead for better UX
@@ -11,7 +11,8 @@ examples:
11
11
  - select_error: Select w/ Error
12
12
  - select_inline: Select Inline
13
13
  - select_inline_compact: Select Inline Compact
14
- - select_data_attributes: Select W/ Data Attributes
14
+ - select_attributes: Select W/ Attributes
15
+ - select_multiple: Select Multiple
15
16
 
16
17
 
17
18
 
@@ -26,3 +27,4 @@ examples:
26
27
  - select_error: Select w/ Error
27
28
  - select_inline: Select Inline
28
29
  - select_inline_compact: Select Inline Compact
30
+ - select_multiple: Select Multiple
@@ -8,3 +8,4 @@ export { default as SelectValueTextSame } from './_select_value_text_same.jsx'
8
8
  export { default as SelectError } from './_select_error.jsx'
9
9
  export { default as SelectInline } from './_select_inline.jsx'
10
10
  export { default as SelectInlineCompact } from './_select_inline_compact.jsx'
11
+ export { default as SelectMultiple } from './_select_multiple.jsx'