Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 497b5ed

Browse files
committed
Merge pull request #1297 from flouc001/master
docs(ui-select): improves onSelectCallback example
2 parents 10a8dc9 + 0bf2d2a commit 497b5ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/demo-event-on-select.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
<h3>Select2 theme</h3>
6666
<p>Selected: {{person.selected}}</p>
67-
<ui-select ng-model="person.selected" theme="select2" on-select="someFunction($item, $model)" ng-disabled="disabled" style="min-width: 300px;" title="Choose a person">
67+
<ui-select ng-model="person.selected" theme="select2" on-select="onSelectCallback($item, $model)" ng-disabled="disabled" style="min-width: 300px;" title="Choose a person">
6868
<ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.name}}</ui-select-match>
6969
<ui-select-choices repeat="person.email as person in people | propsFilter: {name: $select.search, age: $select.search}">
7070
<div ng-bind-html="person.name | highlight: $select.search"></div>

examples/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ app.controller('DemoCtrl', function($scope, $http, $timeout, $interval) {
107107
},3000);
108108

109109
$scope.counter = 0;
110-
$scope.someFunction = function (item, model){
110+
$scope.onSelectCallback = function (item, model){
111111
$scope.counter++;
112112
$scope.eventResult = {item: item, model: model};
113113
};

0 commit comments

Comments
 (0)