When we are using UI-Select we need to reset the selected Item.
We can achieve this by using
<ui-select id="organization" ng-model="data.SelectedOrganization" class="form-control-static" on-select="onSelectedOrg()" > <ui-select-match placeholder=" select a organization..."> {{$select.selected.Text}} </ui-select-match> <ui-select-choices repeat="org in data.Organizations | propsFilter: {Text: $select.search}" refresh="refreshOrgs($select.search)" refresh-delay="0"> <div ng-bind-html="org.Text | highlight: $select.search"></div> </ui-select-choices> </ui-select>
<input id="clear" type="Button" value="Clear" ng-click="clear()" />
Javascript
$scope.clear = function () { $scope.data.SelectedOrganization = undefined; };
Awesome blog with lots of information. It is really helpful for all.
ReplyDeleteAngularJS Training in Chennai
AngularJS course in Chennai
Angular 6 Training in Chennai
ReactJS Training in Chennai
PHP Training in Chennai
Web Designing course in Chennai
Tally course in Chennai
AngularJS Training in Velachery
AngularJS Training in T Nagar
AngularJS Training in OMR
Great Article Cloud Computing Projects
DeleteNetworking Projects
Final Year Projects for CSE
JavaScript Training in Chennai
JavaScript Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
ReplyDeleteI have to agree with everything in this post. Thanks for useful sharing information.
Hadoop Training in Chennai
Hadoop Training in Bangalore
Big Data Course in Coimbatore
Big data course in bangalore
Big Data Hadoop Training in Bangalore
Big Data Training in Bangalore
Python Training in Bangalore
salesforce training in bangalore
hadoop training in marathahalli
hadoop training in btm