Skip to content

Commit 1c7cc13

Browse files
committed
Added "searchConjunction" option (selectize#119).
1 parent 2859657 commit 1c7cc13

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
],
3030
"dependencies": {
3131
"jquery": ">=0.6.0",
32-
"sifter": "0.2.x",
32+
"sifter": "0.3.x",
3333
"microplugin": "0.0.x"
3434
},
3535
"devDependencies": {

docs/usage.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ $(function() {
170170
<td valign="top"><code>array</code></td>
171171
<td valign="top"><code>['text']</code></td>
172172
</tr>
173+
<tr>
174+
<td valign="top"><code>searchConjunction</td>
175+
<td valign="top">When searching for multiple terms (separated by a space), this is the operator used. Can be "and" or "or".</td>
176+
<td valign="top"><code>string</code></td>
177+
<td valign="top"><code>'and'</code></td>
178+
</tr>
173179
<tr>
174180
<td valign="top"><code>optgroupOrder</td>
175181
<td valign="top">An array of optgroup values that indicates the order they should be listed in in the dropdown. If not provided, groups will be ordered by the ranking of the options within them.</td>

src/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Selectize.defaults = {
2626
optgroupValueField: 'value',
2727
optgroupOrder: null,
2828
searchField: ['text'],
29+
searchConjunction: 'and',
2930

3031
mode: null,
3132
wrapperClass: 'selectize-control',

src/selectize.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,9 @@ $.extend(Selectize.prototype, {
831831
var settings = this.settings;
832832

833833
return {
834-
fields : settings.searchField,
835-
sort : settings.sortField
834+
fields : settings.searchField,
835+
conjunction : settings.searchConjunction,
836+
sort : settings.sortField
836837
};
837838
},
838839

0 commit comments

Comments
 (0)