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
I put together this: https://codesandbox.io/s/kmoj4j2823
But as you see on line 92 in index.js, I don't know how to pass the updated array of options to the select.
My goal is to either update the select with the new options, or wait to add the select until the options have been received.
Perhaps something like this will work: this.myForm.parent. setControl('nationality', [my updated control]) but I am not sure how to go about building the control for the second parameter. As well as I am not sure the setControl function is available when I am using the FormGenerator.
another idea that might work well:
use something like this.myForm.get('nationality').setMeta({options: newOptionsArray})
The text was updated successfully, but these errors were encountered:
Fixed in the latest release, now you can update fieldConfig whenever you want but beware to frequently & unnecessary updates, because whenever the fieldConfig changes the whole form will be mounted again.
For your use case I'll recommend to try one of it instead of using a new config.
Use a specific component for selectbox which will fetch the options & update it accordingly.
I put together this: https://codesandbox.io/s/kmoj4j2823
But as you see on line 92 in index.js, I don't know how to pass the updated array of options to the select.
My goal is to either update the select with the new options, or wait to add the select until the options have been received.
Perhaps something like this will work:
this.myForm.parent. setControl('nationality', [my updated control])
but I am not sure how to go about building the control for the second parameter. As well as I am not sure the setControl function is available when I am using the FormGenerator.another idea that might work well:
use something like
this.myForm.get('nationality').setMeta({options: newOptionsArray})
The text was updated successfully, but these errors were encountered: