json-schema-form/angular-schema-form-bootstrap

Select - place holder issue

ramakrij opened this issue · 1 comments

Expected behaviour

I expected the select placeholder to disappear once the user selects any valid option.

Actual behaviour

Place holder does not disappear even after a valid field is selected.

This appears to be due to the order of builder used for select. select: {template: selectTemplate, builder: defaults.concat(selectPlaceholder)}. Since the selectplaceholder builder relies on ngmodel builder replace all functionality, the placeholderbuilder should be invoked before ngmodelbuilder.

Fix: select: {template: selectTemplate, builder: [selectPlaceholder,sfField, ngModel, ngModelOptions, condition]}

@ramakrij thanks for the details I have updated and will be in alpha 4, thankyou very much for providing the solution :)