Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 933275c

Browse files
committed
fix: async shorthand prototype [ci skip]
1 parent 6a1737f commit 933275c

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

docs/src/prototypes/AsyncShorthand/AsyncShorthand.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,26 @@ class CustomChatMessage extends React.Component {
6363
key={props.key}
6464
position="below"
6565
open={this.state.open}
66-
content={
66+
// <Popup.Content content="" />
67+
content={{
68+
content: (
69+
<AsyncData
70+
data={['User 1', 'User 2', 'User 3']}
71+
render={data => {
72+
return !data ? '...loading' : data.map(user => <div key={user}>{user}</div>)
73+
}}
74+
/>
75+
),
76+
}}
77+
trigger={
6778
<AsyncData
68-
data={['User 1', 'User 2', 'User 3']}
69-
render={data => {
70-
return !data ? '...loading' : data.map(user => <div key={user}>{user}</div>)
71-
}}
79+
data={3}
80+
render={data => (
81+
<MenuItem {...props} icon="thumbs up" content={data} onClick={this.togglePopup} />
82+
)}
7283
/>
7384
}
74-
>
75-
<AsyncData
76-
data={3}
77-
render={data => (
78-
<MenuItem {...props} icon="thumbs up" content={data} onClick={this.togglePopup} />
79-
)}
80-
/>
81-
</Popup>
85+
/>
8286
)
8387
}
8488

0 commit comments

Comments
 (0)