mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 01:05:34 +03:00
Dispatch oninput manually when textarea value change
I thought… React/Preact should do this automagically…
This commit is contained in:
parent
735cbf05b7
commit
b0372ea83b
1 changed files with 2 additions and 0 deletions
|
@ -112,6 +112,7 @@ function Compose({
|
||||||
expiresIn: poll?.expiresIn || expiresInFromExpiresAt(poll.expiresAt),
|
expiresIn: poll?.expiresIn || expiresInFromExpiresAt(poll.expiresAt),
|
||||||
};
|
};
|
||||||
textareaRef.current.value = status;
|
textareaRef.current.value = status;
|
||||||
|
textareaRef.current.dispatchEvent(new Event('input'));
|
||||||
spoilerTextRef.current.value = spoilerText;
|
spoilerTextRef.current.value = spoilerText;
|
||||||
setVisibility(visibility);
|
setVisibility(visibility);
|
||||||
setSensitive(sensitive);
|
setSensitive(sensitive);
|
||||||
|
@ -131,6 +132,7 @@ function Compose({
|
||||||
console.log({ statusSource });
|
console.log({ statusSource });
|
||||||
const { text, spoilerText } = statusSource;
|
const { text, spoilerText } = statusSource;
|
||||||
textareaRef.current.value = text;
|
textareaRef.current.value = text;
|
||||||
|
textareaRef.current.dispatchEvent(new Event('input'));
|
||||||
textareaRef.current.dataset.source = text;
|
textareaRef.current.dataset.source = text;
|
||||||
spoilerTextRef.current.value = spoilerText;
|
spoilerTextRef.current.value = spoilerText;
|
||||||
setVisibility(visibility);
|
setVisibility(visibility);
|
||||||
|
|
Loading…
Reference in a new issue