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

Commit c64dd3a

Browse files
Jefiozieaaronroberson
authored andcommitted
docs(demos): update multiple select, appendToBody and filters
* fix(demoMultipleSelect) missing reference to controller. * fix(demoAppendToBody) changed reference to controller. * fix(demoObject) changed filters to work again * fix(demoBasic) fixed reference to ctrl. Closes #1664
1 parent eb7a7e2 commit c64dd3a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Diff for: docs/examples/demo-append-to-body.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ <h3>Bootstrap theme</h3>
1818
append-to-body="true">
1919
<ui-select-match placeholder="Enter an address...">{{$select.selected.formatted_address}}</ui-select-match>
2020
<ui-select-choices repeat="address in ctrl.addresses track by $index"
21-
refresh="refreshAddresses($select.search)"
21+
refresh="ctrl.refreshAddresses($select.search)"
2222
refresh-delay="0">
23-
<div ng-bind-html="ctrl.address.formatted_address | highlight: $select.search"></div>
23+
<div ng-bind-html="address.formatted_address | highlight: $select.search"></div>
2424
</ui-select-choices>
2525
</ui-select>
2626
<p class="alert alert-info positioned">The select dropdown menu should be displayed above this element.</p>

Diff for: docs/examples/demo-basic.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h3>Bootstrap theme <small>(remote data source)</small></h3>
1212
title="Choose an address">
1313
<ui-select-match placeholder="Enter an address...">{{$select.selected.formatted_address}}</ui-select-match>
1414
<ui-select-choices repeat="address in ctrl.addresses track by $index"
15-
refresh="refreshAddresses($select.search)"
15+
refresh="ctrl.refreshAddresses($select.search)"
1616
refresh-delay="0">
1717
<div ng-bind-html="address.formatted_address | highlight: $select.search"></div>
1818
</ui-select-choices>

Diff for: docs/examples/demo-multiple-selection.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h1>Multiple Selection</h1>
77
<h3>Array of strings</h3>
88
<ui-select multiple ng-model="ctrl.multipleDemo.colors" theme="bootstrap" ng-disabled="ctrl.disabled" close-on-select="false" style="width: 300px;" title="Choose a color">
99
<ui-select-match placeholder="Select colors...">{{$item}}</ui-select-match>
10-
<ui-select-choices repeat="color in availableColors | filter:$select.search">
10+
<ui-select-choices repeat="color in ctrl.availableColors | filter:$select.search">
1111
{{color}}
1212
</ui-select-choices>
1313
</ui-select>

Diff for: docs/examples/demo-object-as-source.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h3>Using value for binding</h3>
1111
<p>Selected: <code>{{ctrl.person.selectedValue}}</code></p>
1212
<ui-select ng-model="ctrl.person.selectedValue" theme="select2" ng-disabled="ctrl.disabled" style="min-width: 300px;" title="Choose a person">
1313
<ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.value.name}}</ui-select-match>
14-
<ui-select-choices repeat="person.value as (key, person) in ctrl.peopleObj | filter: {'value':$select.search}">
14+
<ui-select-choices repeat="person.value as (key, person) in ctrl.peopleObj | filter: { value : { name: $select.search }}">
1515
<div ng-bind-html="person.value.name | highlight: $select.search"></div>
1616
<small>
1717
email: {{person.value.email}}
@@ -24,7 +24,7 @@ <h3>Using single property for binding</h3>
2424
<p>Selected: <code>{{ctrl.person.selectedSingle}}</code></p>
2525
<ui-select ng-model="ctrl.person.selectedSingle" theme="select2" ng-disabled="ctrl.disabled" style="min-width: 300px;" title="Choose a person">
2626
<ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.value.name}}</ui-select-match>
27-
<ui-select-choices repeat="person.value.name as (key, person) in ctrl.peopleObj | filter: {'value':$select.search}">
27+
<ui-select-choices repeat="person.value.name as (key, person) in ctrl.peopleObj | filter: { value : { name: $select.search }}">
2828
<div ng-bind-html="person.value.name | highlight: $select.search"></div>
2929
<small>
3030
email: {{person.value.email}}
@@ -37,7 +37,7 @@ <h3>Using key for binding</h3>
3737
<p>Selected: <code>{{ctrl.person.selectedSingleKey}}</code></p>
3838
<ui-select ng-model="ctrl.person.selectedSingleKey" theme="select2" ng-disabled="ctrl.disabled" style="min-width: 300px;" title="Choose a person">
3939
<ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.value.name}}</ui-select-match>
40-
<ui-select-choices repeat="person.key as (key, person) in ctrl.peopleObj | filter: {'value':$select.search}">
40+
<ui-select-choices repeat="person.key as (key, person) in ctrl.peopleObj | filter: { value : { name: $select.search }}">
4141
<div ng-bind-html="person.value.name | highlight: $select.search"></div>
4242
<small>
4343
email: {{person.value.email}}

0 commit comments

Comments
 (0)