react-input-emoji 5.4.1 → 5.5.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +14 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -4907,7 +4907,12 @@ function InputEmoji(props, ref) {
|
|
4907
4907
|
textInputRef.current.html = replaceAllTextEmojis(nextValue);
|
4908
4908
|
sanitizedTextRef.current = nextValue;
|
4909
4909
|
}, [sanitizedTextRef]);
|
4910
|
-
var setValue = React.useCallback(
|
4910
|
+
var setValue = React.useCallback(
|
4911
|
+
/**
|
4912
|
+
*
|
4913
|
+
* @param {string} value
|
4914
|
+
*/
|
4915
|
+
function (value) {
|
4911
4916
|
updateHTML(value);
|
4912
4917
|
}, [updateHTML]);
|
4913
4918
|
var emitChange = useEmit(textInputRef, onResize, onChange);
|
@@ -4921,10 +4926,10 @@ function InputEmoji(props, ref) {
|
|
4921
4926
|
if (sanitizedTextRef.current !== value) {
|
4922
4927
|
setValue(value);
|
4923
4928
|
}
|
4924
|
-
}, [sanitizedTextRef, setValue, value]);
|
4925
|
-
|
4926
|
-
|
4927
|
-
|
4929
|
+
}, [sanitizedTextRef, setValue, value]); // useEffect(() => {
|
4930
|
+
// updateHTML();
|
4931
|
+
// }, [updateHTML]);
|
4932
|
+
|
4928
4933
|
React.useEffect(function () {
|
4929
4934
|
/**
|
4930
4935
|
* Handle keydown event
|
@@ -5005,7 +5010,10 @@ function InputEmoji(props, ref) {
|
|
5005
5010
|
|
5006
5011
|
function handleTextInputChange(html) {
|
5007
5012
|
sanitize(html);
|
5008
|
-
|
5013
|
+
|
5014
|
+
if (value !== sanitizedTextRef.current) {
|
5015
|
+
emitChange(sanitizedTextRef.current);
|
5016
|
+
}
|
5009
5017
|
}
|
5010
5018
|
/**
|
5011
5019
|
*
|