react-input-emoji icon indicating copy to clipboard operation
react-input-emoji copied to clipboard

Bug: The default value containing any emojis cannot be set.

Open xNevrroXx opened this issue 2 years ago β€’ 1 comments

When I trying to set as a default value just a text, without emojis, it works fine. But when I add any emojis to the default value - every emoji in the input is not visible at all, to be more precise, it looks like an empty space, an image without styles.

/*
 * Try to use the "text with emojisπŸ˜„πŸ™„" string as a default value:
 * here we get the following **visible** content: "text with emojis  ",
 * and the emojis "πŸ˜„πŸ™„" will have no styles.
 * */
const MyComponent = () => {
    const [message, setMessage] = useState<string>("");

    useEffect(() => {
        // set the default value
        setMessage("text with emojisπŸ˜„πŸ™„");
    }, []);

    return <InputEmoji value={message} onChange={setMessage} />; 
};

xNevrroXx avatar Dec 30 '23 21:12 xNevrroXx

I've the same problem, Could've you fixed that?

cluttgue avatar May 23 '24 21:05 cluttgue