forked from Gitlink/forgeplus-react
添加成员--随便输入不存在的用户时的提示
This commit is contained in:
parent
3dffbce8d9
commit
8b161630c3
|
@ -4,7 +4,7 @@ import axios from 'axios';
|
|||
import { getImageUrl } from 'educoder';
|
||||
|
||||
const { Option } = AutoComplete;
|
||||
function AddMember({getID,login}){
|
||||
function AddMember({getID,login,showNotification}){
|
||||
const [ id , setID ] = useState(undefined);
|
||||
const [ source , setSource ] = useState(undefined);
|
||||
const [ searchKey , setSearchKey ] = useState(undefined);
|
||||
|
@ -66,8 +66,12 @@ function AddMember({getID,login}){
|
|||
};
|
||||
|
||||
function addCollaborator(){
|
||||
getID && getID(id);
|
||||
setSearchKey(undefined);
|
||||
if(source && source.length>0){
|
||||
getID && getID(id);
|
||||
setSearchKey(undefined);
|
||||
}else{
|
||||
showNotification("请选择存在的用户!");
|
||||
}
|
||||
}
|
||||
|
||||
return(
|
||||
|
|
|
@ -92,7 +92,7 @@ class NewHeader extends Component {
|
|||
className={`search-input mr20`}
|
||||
onSearch={(value)=>this.onGlobalSearch(value,item)}
|
||||
autoFocus={true}
|
||||
style={{width:"190px"}}
|
||||
style={{width:"260px"}}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -34,7 +34,7 @@ function Collaborator(props){
|
|||
}
|
||||
{
|
||||
nav === "1" ?
|
||||
<AddMember getID={getID} login/>
|
||||
<AddMember getID={getID} login showNotification={props.showNotification}/>
|
||||
:
|
||||
<AddGroup getGroupID={getGroupID} organizeId={owner}/>
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ export default ((props) => {
|
|||
<WhiteBack style={{minHeight:"400px"}}>
|
||||
<Title>
|
||||
<span>团队成员管理</span>
|
||||
<AddMember getID={getID}/>
|
||||
<AddMember getID={getID} showNotification={props.showNotification}/>
|
||||
</Title>
|
||||
<FlexAJ className="padding20-30">
|
||||
<div style={{ width: "580px" }}>
|
||||
|
|
Loading…
Reference in New Issue