playbook_ui_docs 14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5341 → 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: 1b87aa30f33e7b108b4e005b9abe1fa36f76f435ba0425261e2b1efeffcbea44
4
- data.tar.gz: '05822f0b929223ef65c7c00512bdd6aa804f94eb545d54b99cb69cad8573627f'
3
+ metadata.gz: 71e9003b205fa267a12af77bac18b9050b3a471625c9321c3e0489671d7c553f
4
+ data.tar.gz: cdc85654bd905ff59cc69f72108263b3fd0d46de927da058c1649b15d63e3d78
5
5
  SHA512:
6
- metadata.gz: 7fe509985ac4eee981ffc5b477f986a23ec6eca428b59b1e3b0aac9e7572337e3e94d125af83c98b766f35a19f01bf7f2683fac4641ce27a4e8295cd3d7b1320
7
- data.tar.gz: 983b9bd19890c4d1c056b636220c68ab570ff01d700c32d7d3892b0d6bff05842c7f26db0ffaf98fea092e9b4f4b1b6557572babf58186ae155d2442353b8262
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}