mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fix: Textarea exposed variable not updated on app load (#10327)
* fix: Textarea exposed variable not updated on app load * fix: Textarea exposed variable not updated on app load --------- Co-authored-by: Johnson Cherian <johnsonc.dev@gmail.com>
This commit is contained in:
parent
13b2832c8c
commit
4aa2e406eb
1 changed files with 8 additions and 3 deletions
|
|
@ -12,13 +12,18 @@ export const TextArea = function TextArea({
|
|||
|
||||
useEffect(() => {
|
||||
setValue(properties.value);
|
||||
setExposedVariable('value', properties.value);
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [properties.value]);
|
||||
|
||||
useEffect(() => {
|
||||
const exposedVariables = {
|
||||
value: properties.value,
|
||||
setText: async function (text) {
|
||||
setValue(text);
|
||||
setExposedVariable('value', text);
|
||||
},
|
||||
clear: async function (text) {
|
||||
clear: async function () {
|
||||
setValue('');
|
||||
setExposedVariable('value', '');
|
||||
},
|
||||
|
|
@ -26,7 +31,7 @@ export const TextArea = function TextArea({
|
|||
setExposedVariables(exposedVariables);
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [properties.value, setValue]);
|
||||
}, [setValue]);
|
||||
|
||||
return (
|
||||
<textarea
|
||||
|
|
|
|||
Loading…
Reference in a new issue