mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-12 19:23:13 +08:00
feat(composer): render suggestion via custom component
This commit is contained in:
parent
f89b905b10
commit
36abf5b608
1 changed files with 4 additions and 13 deletions
|
@ -72,20 +72,11 @@ export default class ParticipantsTextField extends React.Component {
|
|||
}
|
||||
|
||||
_completionNode = (p) => {
|
||||
if (p instanceof Contact) {
|
||||
return (
|
||||
<Menu.NameEmailItem name={p.name} email={p.email} key={p.id} />
|
||||
);
|
||||
}
|
||||
const CustomComponent = p.customComponent
|
||||
if (CustomComponent) return (<CustomComponent token={p} />)
|
||||
return (
|
||||
<InjectedComponentSet
|
||||
ref="textField"
|
||||
matching={{role: 'ContactSearchResults'}}
|
||||
exposedProps={{token: p}}
|
||||
direction="row"
|
||||
inline
|
||||
/>
|
||||
)
|
||||
<Menu.NameEmailItem name={p.name} email={p.email} key={p.id} />
|
||||
);
|
||||
}
|
||||
|
||||
_tokensForString = (string, options = {}) => {
|
||||
|
|
Loading…
Reference in a new issue