You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was able to implement a load preset feature using j-Input and the WATCH function provided by jComponent inside a Flow component.
When choosing a value on the j-Input, it would pre-fill other text boxes based on the preset chosen.
The intended functionality works fine, but whenever I open the Flow component that contains the j-Input, the WATCH function automatically triggers even if I set the init parameter as false. I assume the initial filling out information by Flow is causing the WATCH function to trigger. I tried using the $setter configuration as well and it behaves identically as the WATCH function.
As a result, this behavior causes the WATCH function to override whatever was already on the text boxes back to the default preset values.
Is this an intended behavior where the the WATCH function will trigger when opening a component? If so, could you recommend me another approach I can take?
Thanks as always :)
The text was updated successfully, but these errors were encountered:
If the path you are watching is let's say settings.component_name.input then the watcher will fire when you open the settings form because settings.component_name is set again.
What you can do is to check if the path is really settings.component_name.input like this:
// this watcher will fire when settings form opens because `settings.component_name` changedWATCH('settings.component_name.input',function(path,value,type){if(path==='settings.component_name.input')console.log('i have changed');});
If the path you are watching is let's say settings.component_name.input then the watcher will fire when you open the settings form because settings.component_name is set again.
What you can do is to check if the path is really settings.component_name.input like this:
// this watcher will fire when settings form opens because `settings.component_name` changedWATCH('settings.component_name.input',function(path,value,type){if(path==='settings.component_name.input')console.log('i have changed');});
Thanks! That's exactly what I was looking for. I didn't know the patch value could've been utilized that way :)
Hi, I was able to implement a load preset feature using j-Input and the WATCH function provided by jComponent inside a Flow component.
When choosing a value on the j-Input, it would pre-fill other text boxes based on the preset chosen.
The intended functionality works fine, but whenever I open the Flow component that contains the j-Input, the WATCH function automatically triggers even if I set the
init
parameter as false. I assume the initial filling out information by Flow is causing the WATCH function to trigger. I tried using the$setter
configuration as well and it behaves identically as the WATCH function.As a result, this behavior causes the WATCH function to override whatever was already on the text boxes back to the default preset values.
Is this an intended behavior where the the WATCH function will trigger when opening a component? If so, could you recommend me another approach I can take?
Thanks as always :)
The text was updated successfully, but these errors were encountered: