mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +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),
|
||||
};
|
||||
textareaRef.current.value = status;
|
||||
textareaRef.current.dispatchEvent(new Event('input'));
|
||||
spoilerTextRef.current.value = spoilerText;
|
||||
setVisibility(visibility);
|
||||
setSensitive(sensitive);
|
||||
|
@ -131,6 +132,7 @@ function Compose({
|
|||
console.log({ statusSource });
|
||||
const { text, spoilerText } = statusSource;
|
||||
textareaRef.current.value = text;
|
||||
textareaRef.current.dispatchEvent(new Event('input'));
|
||||
textareaRef.current.dataset.source = text;
|
||||
spoilerTextRef.current.value = spoilerText;
|
||||
setVisibility(visibility);
|
||||
|
|
Loading…
Reference in a new issue