Open ciclick opened 8 years ago
Hi,
I just updated from lumx 0.3.4 to 1.0.5 and now the lx-select elements created with angular formly shows all the object data in the selector list, not the choice option. I'm using angular-formly 8.2.1 and angular-formly-templates-lumx 2.0.5.
My objects:
vm.fields =[ { "className": "row", "fieldGroup": [ { "className": "col-xs-10 col-sm-9", "type": "lx-select", "key": "media", "templateOptions": { 'floating-label': false, 'placeholder': 'Mitjà del contacte', 'selected': 'name', 'choice': 'name', 'options': vm.medias, 'multiple': true, 'required': true } } ] } ];
vm.options = [ { name: 'Mitjà 1', idMedia: '1'}, { name: 'Mitjà 2', idMedia: '2'} ];
And the select shows: {"name":"Mitjà 1","idMedia":"1"} {"name":"Mitjà 2","idMedia":"2"}
Instead of: Mitjà 1 Mitjà 2
Seems that the template can't catch the "to.choice" variable
Thank you!
Hi,
I just updated from lumx 0.3.4 to 1.0.5 and now the lx-select elements created with angular formly shows all the object data in the selector list, not the choice option. I'm using angular-formly 8.2.1 and angular-formly-templates-lumx 2.0.5.
My objects:
vm.fields =[ { "className": "row", "fieldGroup": [ { "className": "col-xs-10 col-sm-9", "type": "lx-select", "key": "media", "templateOptions": { 'floating-label': false, 'placeholder': 'Mitjà del contacte', 'selected': 'name', 'choice': 'name', 'options': vm.medias, 'multiple': true, 'required': true } } ] } ];
vm.options = [ { name: 'Mitjà 1', idMedia: '1'}, { name: 'Mitjà 2', idMedia: '2'} ];
And the select shows: {"name":"Mitjà 1","idMedia":"1"} {"name":"Mitjà 2","idMedia":"2"}
Instead of: Mitjà 1 Mitjà 2
Seems that the template can't catch the "to.choice" variable
Thank you!