Restore pristine / initial state after insert #561
-
Using the above events works as expected except that after clearing values of the dot state, the validation still passes for a empty dot state To Reproduce Expected behavior Lowdefy Version |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @ahmedrshdy events:
onClick:
- id: validate
type: Validate
- id: add_professional
type: Request
params: insert_professional
- id: pristine
type: Reset
- id: close_drawer
type: CallMethod
params:
blockId: add_professional_drawer
method: toggleOpen In Lowdefy we are a little more strict about types in |
Beta Was this translation helpful? Give feedback.
Hi @ahmedrshdy
To reset
state
you can simply use the Reset action. Alternatively setting the input values tonull
will have the same effect in this case. So consider:In Lowdefy we are a little more strict about types in
state
than vanilla js to make the behavior ofstate
more predictable. The enforceType method is used to initialize all …