Skip to content

Commit e6b459f

Browse files
committed
Add new dropdown/search settings
1 parent b0e820a commit e6b459f

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

server/documents/modules/dropdown.html.eco

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ themes : ['Default', 'GitHub', 'Material']
14201420
<h2 class="ui dividing header">Remote Content</h2>
14211421

14221422
<div class="remote no example">
1423-
<h4 class="ui header">Using Returned API Results</h4>
1423+
<h4 class="ui header">Returning Matched Values Remotely</h4>
14241424
<p>Search selection dropdowns can specify <a href="/behaviors/api.html">API settings</a> for retrieving values remotely, this can use either a named API <code>action</code> or <code>url</code>.</p>
14251425
<p class="ignored">Using API can allow users to select choices from large datasets that would be too large to include directly in page markups.</p>
14261426
<p class="ignored">If your backend is not designed to return the correct markup you can use API's <code><a href="/behaviors/api.html#adjusting-server-responses">onResponse</a></code> callback to adjust the format of an API response after it is received from the server.</p>
@@ -1506,8 +1506,8 @@ themes : ['Default', 'GitHub', 'Material']
15061506
</div>
15071507

15081508
<div class="remote no example">
1509-
<h4 class="ui header">Using Returned Queryset</h4>
1510-
<p>Ideally API results should only return values <b>matching the passed query term</b> to reduce transmissions over the wire, however as a convenience, you may also return the full set of results from an API endpoint and filter them against the query clientside using the setting <code>filterAPIResults: true</code>.</p>
1509+
<h4 class="ui header">Retreiving All Values Remotely</h4>
1510+
<p>Ideally API results should only return values <b>matching the passed query term</b> to reduce transmissions over the wire, however as a convenience, you may also return the full set of results from an API endpoint and filter them against the query clientside using the setting <code>filterRemoteData: true</code>.</p>
15111511
<div class="ui form">
15121512
<div class="two fields">
15131513
<div class="field">
@@ -1538,7 +1538,7 @@ themes : ['Default', 'GitHub', 'Material']
15381538
// this url just returns a list of tags (with API response expected above)
15391539
url: '//api.semantic-ui.com/tags/'
15401540
},
1541-
filterAPIResults: true
1541+
filterRemoteData: true
15421542
})
15431543
;
15441544
</div>
@@ -2495,6 +2495,11 @@ themes : ['Default', 'GitHub', 'Material']
24952495
</td>
24962496
<td>List mapping dropdown content to JSON Property when using API</td>
24972497
</tr>
2498+
<tr>
2499+
<td>filterRemoteData</td>
2500+
<td>false</td>
2501+
<td>Whether results returned from API should be filtered by query before being displayed</td>
2502+
</tr>
24982503
<tr>
24992504
<td>saveRemoteData</td>
25002505
<td>true</td>

server/documents/modules/search.html.eco

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,11 @@ type : 'UI Module'
585585
<td>1</td>
586586
<td>Minimum characters to query for results</td>
587587
</tr>
588+
<tr>
589+
<td>searchOnFocus</td>
590+
<td>true</td>
591+
<td>Whether search should show results on focus (must also match min character length)</td>
592+
</tr>
588593
<tr>
589594
<td>transition</td>
590595
<td>

server/files/stylesheets/docs.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,9 @@ blockquote .author {
235235
margin-top: 0.3em;
236236
}
237237
#example .language.dropdown > .menu {
238+
width: 280px;
238239
transform: translate3d(0, 0, 0);
239240
}
240-
#example .language.dropdown > .menu .description {
241-
display: none;
242-
}
243241

244242
/*--------------
245243
Page Tabs

0 commit comments

Comments
 (0)