react-native-tag-input icon indicating copy to clipboard operation
react-native-tag-input copied to clipboard

If we do click on Spacebar, It should not produce the empty content. ANY SOLUTION ??

Open workninja19 opened this issue 4 years ago • 2 comments

IMG_20200628_210540

workninja19 avatar Jun 28 '20 15:06 workninja19

Are you still having this issue?

jwilld avatar Dec 19 '20 16:12 jwilld

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);
    }
}

NoorAhmed407 avatar Apr 22 '22 06:04 NoorAhmed407