0
I dropdown with Angularjs in the following way
<ui-select ng-model="SelectedItem.LegalEntity"
theme="bootstrap"
reset-search-input="false"
style="width: 100%"
id="legalEntityId"
ng-disabled="disabled">
<ui-select-match placeholder="">{{$select.selected.Name}}</ui-select-match>
<ui-select-choices repeat="entity in legalEntities">
<div ng-bind-html="entity.Name | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
When the dropdown has only 1 item in the list, I want to block the dropdown and leave the first item already selected.
I can already lock using ng-disable, but I couldn’t load the page with the first dropdown item selected.
a Working fiddle was great to be easier. Anyway, the
ui-select
has no propertyselected
? if yes, supposedly theng-selected="expression"
should be enough– MoshMage
i use <ui-select-Choices repeat="Entity in legalEntities">
– Ademilton Marcelo Nunes