ng-dynamic-forms
ng-dynamic-forms copied to clipboard
Select Control not rendering the updated model, when model (ie value & options) is updated asynchronously (Http Call)
I'm submitting a
[X] Bug / Regression
[ ] Feature Request / Proposal
I'm using
NG Dynamic Forms Version: `7.1.1`
[ ] Basic UI
[ ] Bootstrap UI
[ ] Foundation UI
[X] Ionic UI
[ ] Kendo UI
[ ] Material
[ ] NG Bootstrap
[ ] Prime NG
Description
When updating the model (ie value & options) of a Select control (DynamicSelectModel) via a Http Call, there seems to be an issue with rendering the updated model.
The use case I developing for is, I have dynamic template for the form which is cached. However the options for the select control needs to be retrieved from the server, as these options would change from time to time. Also, sometimes the server also sends the default value for the Select control along with the options.
To reproduce the issue, please refer this StackBlitz
Sometimes only Behaviour 1 is reproduced on StackBlitz. However if you hit the refresh on the Stackblitz preview pane, you will be able to see all issues mentioned below.
Actual Behaviour:
- Value is not being set
- On the first click of the Select control, the popup does not have any select-options
- On Dismissing the Select Popup, and clicking the Select control, the popup is now populated. However, the selected value is not selected in the options.
Expected Behaviour:
- Value must be set
- On click of Select control, popup should contain all options with the selected option.