react-native-tag-input
react-native-tag-input copied to clipboard
If we do click on Spacebar, It should not produce the empty content. ANY SOLUTION ??
Are you still having this issue?
onChangeText={(text) =>onChangeTagValue(text)}
//OnChangeTagValue Function
const onChangeTagValue = (val)=>{
let lastCharacter = val.charAt(val.length - 1);
if(lastCharacter == " " && val.trim().length){
setTagText('');
setTags([...tags,val.trim()]);
}
else{
setTagText(val);
}
}