Closed KelvinSan closed 2 months ago
Hey @KelvinSan, I was running into the same issue in my app swapping between different views with different field configurations and/or field values. The quick fix I found was to use the Svelte "key" tag to force a re-render of the entire form.
Example (I have unique form names on each view but putting "fields" in as the key should work as well):
{#key form_name}
<Formly
{form_name}
{fields}
btnReset={{"text":"","classes":['invisible']}}
btnSubmit={{"text":``,"classes":['invisible']}}
on:update={formUpdated}
realtime={true}
/>
{/key}
Hope that helps you and others.
Currently I a modal that render form via API call, however when I change the contents of fields via API response the form does not change. How can I make this possible ?