Skip to content

Commit 55b27ce

Browse files
committed
Dropdown docs, new jq
1 parent 3b032ab commit 55b27ce

4 files changed

Lines changed: 386 additions & 192 deletions

File tree

server/documents/modules/dropdown.html.eco

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,8 +1419,8 @@ themes : ['Default', 'GitHub', 'Material']
14191419

14201420
<h2 class="ui dividing header">Remote Content</h2>
14211421

1422-
<div class="remote no example">
1423-
<h4 class="ui header">Returning Matched Values Remotely</h4>
1422+
<div class="remote filter no example">
1423+
<h4 class="ui header">Match Search Query on Server</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>
@@ -1452,7 +1452,7 @@ themes : ['Default', 'GitHub', 'Material']
14521452
</div>
14531453

14541454
<div class="evaluated code" data-type="javascript">
1455-
$('.remote.example .ui.dropdown')
1455+
$('.remote.filter.example .ui.dropdown')
14561456
.dropdown({
14571457
apiSettings: {
14581458
// this url parses query server side and returns filtered results
@@ -1505,11 +1505,19 @@ themes : ['Default', 'GitHub', 'Material']
15051505
</div>
15061506
</div>
15071507

1508-
<div class="remote no example">
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>
1508+
<div class="remote choices no example">
1509+
<h4 class="ui header">Return All Choices Remotely</h4>
1510+
<p>When possible choicesets are large, ideally API results should only return values <b>matching the passed query term</b> to reduce transmissions over the wire. However if there are only a few hundred or less choices, you may consider returning the full set of results from an API endpoint and filtering them against the query clientside using the setting <code>filterRemoteData: true</code>.</p>
15111511
<div class="ui form">
1512-
<div class="two fields">
1512+
<div class="three fields">
1513+
<div class="field">
1514+
<label>Favorite Animal</label>
1515+
<div class="ui selection dropdown">
1516+
<input type="hidden">
1517+
<i class="dropdown icon"></i>
1518+
<div class="default text">Select one...</div>
1519+
</div>
1520+
</div>
15131521
<div class="field">
15141522
<label>Favorite Animal</label>
15151523
<div class="ui search selection dropdown">
@@ -1532,7 +1540,7 @@ themes : ['Default', 'GitHub', 'Material']
15321540
</div>
15331541

15341542
<div class="evaluated code" data-type="javascript">
1535-
$('.remote.example .ui.dropdown')
1543+
$('.remote.choices.example .ui.dropdown')
15361544
.dropdown({
15371545
apiSettings: {
15381546
// this url just returns a list of tags (with API response expected above)

0 commit comments

Comments
 (0)