Skip to content

Commit 192bd5c

Browse files
committed
Updated docs for local search
Closes #85
1 parent 253a4f0 commit 192bd5c

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

demo/src/app/pages/search/search.page.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ <h2 class="ui dividing header">Examples</h2>
1111
<h4 class="ui header">Local</h4>
1212
<p>A search can display a set of local results</p>
1313
</div>
14-
<search-example-standard result></search-example-standard>
14+
<div result>
15+
<search-example-standard></search-example-standard>
16+
<br>
17+
<p>
18+
Note: Setting the <code>[options]</code> property to a function that takes a query
19+
and returns an array of results allows for custom search functions on local data.
20+
</p>
21+
</div>
1522
</demo-example>
1623
<demo-example [code]="exampleRemoteTemplate">
1724
<div info>

demo/src/app/pages/search/search.page.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class SearchPage {
3333
{
3434
name: "options",
3535
type: "T[] | LookupFn<T>",
36-
description: "Sets the options available to the search component. Can either be an array or a function that takes a query and returns a Promise for remote lookup.",
36+
description: "Sets the options available to the search component. Can either be an array, or a function that takes a query and returns either a <code>Promise</code> (for remote lookups) or an array (for custom local searches).",
3737
required: true
3838
},
3939
{
@@ -73,8 +73,8 @@ export class SearchPage {
7373
]
7474
}
7575
];
76-
public exampleStandardTemplate;
77-
public exampleRemoteTemplate;
76+
public exampleStandardTemplate = exampleStandardTemplate;
77+
public exampleRemoteTemplate = exampleRemoteTemplate;
7878
}
7979

8080
@Component({

demo/src/app/pages/select/select.page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class SelectPage {
104104
{
105105
name: "options",
106106
type: "T[] | LookupFn<T>",
107-
description: "Sets the options available to the select component. Can either be an array or a function that takes a query and returns a Promise for remote lookup."
107+
description: "Sets the options available to the select component. Can either be an array, or a function that takes a query and returns either a <code>Promise</code> (for remote lookups) or an array (for custom local searches)."
108108
},
109109
{
110110
name: "labelField",

0 commit comments

Comments
 (0)