playbook_ui_docs 14.11.1.pre.alpha.responsivetablerails5364 → 14.12.0.pre.rc.0

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: a94c17486f10ddeeeee822eaaf73f4f67f536c6a9e136116d95d4333765efe3c
4
- data.tar.gz: f6644f66fd2d8ba908a0793e8d6f083c5c3d845b8b24aa0254d3baf52c024ecb
3
+ metadata.gz: 71e9003b205fa267a12af77bac18b9050b3a471625c9321c3e0489671d7c553f
4
+ data.tar.gz: cdc85654bd905ff59cc69f72108263b3fd0d46de927da058c1649b15d63e3d78
5
5
  SHA512:
6
- metadata.gz: be69099c771edadf2d4d37f1d4f3b96ddee38ab85b5af762773c6045f2d9f57b20e6d922e6add80e84f2d1a461aa7e3a24d697e05dc0cac4967f986a58369714
7
- data.tar.gz: 3e8f78823d8c022b4f5bcc7863c69c425f9106951b7fc08b254743ed39d3c66300bd3f08f8f57f9681d28a402f919055e6ae3572da6fdd4dff2c3d460df28fa9
6
+ metadata.gz: ce8a94240ae1e52eeb13856c03f8440153ada24ad0085b57c6acc2de3337c267c43f4e2a3c09dbb77a07bf1cf97dded856f680a8fe97d2da77b8dd53ba72503b
7
+ data.tar.gz: 218397ebd4b192b51c0bd87d49c4f91ef74a6a1e4e9e585deb364208b805c745af27120857b065baaca74332a7142b651df02252156b3a723f77213de029668f
@@ -3,7 +3,6 @@ examples:
3
3
  - advanced_table_beta: Default (Required Props)
4
4
  - advanced_table_beta_subrow_headers: SubRow Headers
5
5
  - advanced_table_collapsible_trail_rails: Collapsible Trail
6
- - advanced_table_table_props: Table Props
7
6
  - advanced_table_beta_sort: Enable Sorting
8
7
  - advanced_table_custom_cell_rails: Custom Components for Cells
9
8
  - advanced_table_column_headers: Multi-Header Columns
@@ -1,5 +1,3 @@
1
- /* eslint-disable react/no-multi-comp */
2
-
3
1
  import React, { useState } from 'react'
4
2
 
5
3
  import {
@@ -45,7 +45,8 @@ const promiseOptions = (inputValue) =>
45
45
 
46
46
  const TypeaheadWithPillsAsync = (props) => {
47
47
  const [users, setUsers] = useState([])
48
-
48
+ const handleOnChange = (value) => setUsers(formatUsers(value))
49
+ const formatValue = (users) => formatUsers(users)
49
50
  const formatUsers = (users) => {
50
51
  const results = () => (users.map((user) => {
51
52
  if (Object.keys(user)[0] === 'name' || Object.keys(user)[1] === 'id'){
@@ -57,9 +58,6 @@ const TypeaheadWithPillsAsync = (props) => {
57
58
  return results()
58
59
  }
59
60
 
60
- const handleOnChange = (value) => setUsers(formatUsers(value))
61
- const formatValue = (users) => formatUsers(users)
62
-
63
61
  return (
64
62
  <>
65
63
  {users && users.length > 0 && (
@@ -83,13 +83,13 @@ const TypeaheadWithPillsAsyncCustomOptions = (props) => {
83
83
  onChange={handleOnChange}
84
84
  onMultiValueClick={handleOnMultiValueClick}
85
85
  placeholder="type the name of a Github user"
86
- valueComponent={({imageUrl, label, territory, type}) => (
86
+ valueComponent={(props) => (
87
87
  <User
88
88
  avatar
89
- avatarUrl={imageUrl}
90
- name={label}
91
- territory={territory}
92
- title={type}
89
+ avatarUrl={props.imageUrl}
90
+ name={props.label}
91
+ territory={props.territory}
92
+ title={props.type}
93
93
  />
94
94
  )}
95
95
  {...props}