playbook_ui_docs 14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5274 → 14.10.0.pre.alpha.play1465attempt25272

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: 877ffced2933cbb96f1f6e492eb32185c9188e472a85e3aefb5eac54a38046fd
4
- data.tar.gz: 20269a31e066feb582e95674dab94e8b5e940f7a38fd6aa2d8356721748a567d
3
+ metadata.gz: 2b7fecce4978cd084fbb5b38e490ff59e2bb2cae9e4ad3c31df947795a7c77fe
4
+ data.tar.gz: 291b7a3dc26c0e6d21f7a34b7fe0c419c8e5cc6a4bf225373b504e60a9a8841e
5
5
  SHA512:
6
- metadata.gz: 9e23ea06428b6f051f60b33a654dba11f5e7dbedada92ffe2ca1801b6549c38c022db958ab00afe9cda2b7d1d6c92fb850a36566fc98a2b36d66863b1383fe2a
7
- data.tar.gz: 73554e253b0d5c97de77db7f978e53cf22afa507474bb34c09bb788f3b54f19daeafa3baba14463d3be4f9a126f5a9d12e0a2bbc76c70aaddb98d378c8d1e583
6
+ metadata.gz: eba273c321e515386c948aae00fbde3b17c31fa5f038cfd2627d1c234efb26d4dda9ed5dc0b67d29c06e11497da24eda490d15f060f1419d5c09d3304117002c
7
+ data.tar.gz: 70eab09d4b00d5479800fb7709d1273e6744e0d5ab3f8d327a86fed2b381b1585f3cc7e00e90337dc3de32b11f7205e3417a78e81230d6bc23df09aa07ace9dd
@@ -1,3 +1,5 @@
1
+ /* eslint-disable react/no-multi-comp */
2
+
1
3
  import React, { useState } from 'react'
2
4
 
3
5
  import {
@@ -45,8 +45,7 @@ const promiseOptions = (inputValue) =>
45
45
 
46
46
  const TypeaheadWithPillsAsync = (props) => {
47
47
  const [users, setUsers] = useState([])
48
- const handleOnChange = (value) => setUsers(formatUsers(value))
49
- const formatValue = (users) => formatUsers(users)
48
+
50
49
  const formatUsers = (users) => {
51
50
  const results = () => (users.map((user) => {
52
51
  if (Object.keys(user)[0] === 'name' || Object.keys(user)[1] === 'id'){
@@ -58,6 +57,9 @@ const TypeaheadWithPillsAsync = (props) => {
58
57
  return results()
59
58
  }
60
59
 
60
+ const handleOnChange = (value) => setUsers(formatUsers(value))
61
+ const formatValue = (users) => formatUsers(users)
62
+
61
63
  return (
62
64
  <>
63
65
  {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={(props) => (
86
+ valueComponent={({imageUrl, label, territory, type}) => (
87
87
  <User
88
88
  avatar
89
- avatarUrl={props.imageUrl}
90
- name={props.label}
91
- territory={props.territory}
92
- title={props.type}
89
+ avatarUrl={imageUrl}
90
+ name={label}
91
+ territory={territory}
92
+ title={type}
93
93
  />
94
94
  )}
95
95
  {...props}