adding callback to add member dispatch function and allowing for member not on system to be created
This commit is contained in:
parent
2c61693c21
commit
61db98e842
@ -46,7 +46,11 @@ const Invite = React.createClass({
|
||||
parentIndex: this.props.parentIndex,
|
||||
};
|
||||
|
||||
this.props.addMemember(data);
|
||||
this.props.addMemember(data, () => {
|
||||
this.setState({
|
||||
selectValue: ''
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
render() {
|
||||
@ -88,8 +92,9 @@ const Invite = React.createClass({
|
||||
<Row>
|
||||
<Column xs={12}>
|
||||
<form onSubmit={this.handleSubmit}>
|
||||
<Select
|
||||
<Select.Creatable
|
||||
onChange={handleSelectChange}
|
||||
onNewOptionClick={handleSelectChange}
|
||||
options={selectData}
|
||||
placeholder="Enter an email address or password"
|
||||
style={InputStyle}
|
||||
|
@ -44,7 +44,8 @@ const mapStateToProps = (state, {
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
addMemember: (member) => dispatch(addMemberToOrg(member)),
|
||||
addMemember: (member, callback) =>
|
||||
dispatch(addMemberToOrg(member, callback)),
|
||||
handleToggle: () => dispatch(orgHandleInviteToggle()),
|
||||
handleStatusTooltip: (id) => dispatch(orgHandlePeopleStatusTooltip(id)),
|
||||
handleRoleTooltip: (id) => dispatch(orgHandlePeopleRoleTooltip(id)),
|
||||
|
@ -44,7 +44,8 @@ const mapStateToProps = (state, {
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
addMemember: (member) => dispatch(addMemberToProject(member)),
|
||||
addMemember: (member, callback) =>
|
||||
dispatch(addMemberToProject(member, callback)),
|
||||
handleToggle: () => dispatch(projectHandleInviteToggle()),
|
||||
handleStatusTooltip: (id) => dispatch(projectHandlePeopleStatusTooltip(id)),
|
||||
handleRoleTooltip: (id) => dispatch(projectHandlePeopleRoleTooltip(id)),
|
||||
|
Loading…
Reference in New Issue
Block a user