Open cniesen opened 6 years ago
The issue is that in ListField.js prepareControlModel function the model.selectOptions is an empty array. The options are available under model.options.dataSource.
I guess this bug was introduced with this refactor.
There is a timing issue with populateDisplayableText() and when the selectOptions are populated. The pull request should fix this issue.
Hi @cniesen all of the controls that extend Alpaca.Fields.ListField have many bugs since that refactor that you mentioned. The bug you resolve above happens on initial render of a form. There is another bug where if you call 'SetValue' on the root level control to update all values on a form, readonly list fields are also left blank. Very average refactor.
I will be writing a couple of tests and hopefully my pull request gets merged this time.
I applied this same fix but on current master (1.5.27) it solved my problem with read only select, thanks!
The
web-display
/bootstrap-display
view no longer displays the value with select fields. The (selected) data value isn't being displayed in read-only mode. It used to work with the 1.5.14 release.Sample code:
Change the
web-edit
toweb-display
.