prevent space in question name

This commit is contained in:
GotPPay
2018-01-25 16:09:12 +01:00
parent 9b58f7745b
commit 84edb5563f

View File

@@ -126,7 +126,7 @@ class IntentDetails extends Component {
handleIntentNameEdit(e){ handleIntentNameEdit(e){
if (e.length === INTENT_NAME_MAX_LENGTH) return; if (e.length === INTENT_NAME_MAX_LENGTH) return;
let newIntent = this.state.intent; let newIntent = this.state.intent;
newIntent.intentName = e; newIntent.intentName = e.replace(/\s/g, ''); //remove all spaces from intent name
this.setState({intent: newIntent}); this.setState({intent: newIntent});
} }
} }