-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
defaults.js
95 lines (87 loc) · 2.72 KB
/
defaults.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Selectize.count = 0;
Selectize.defaults = {
options: [],
optgroups: [],
plugins: [],
delimiter: ',',
splitOn: null, // regexp or string for splitting up values from a paste command
persist: true,
diacritics: true,
create: false,
showAddOptionOnCreate: true,
createOnBlur: false,
createFilter: null,
highlight: true,
openOnFocus: true,
maxOptions: 1000,
maxItems: null,
hideSelected: null,
addPrecedence: false,
selectOnTab: true,
preload: false,
allowEmptyOption: false,
showEmptyOptionInDropdown: false,
emptyOptionLabel: '--',
setFirstOptionActive: false,
closeAfterSelect: false,
closeDropdownThreshold: 250, // number of ms to prevent reopening of dropdown after mousedown
scrollDuration: 60,
deselectBehavior: 'previous', //top, previous
loadThrottle: 300,
loadingClass: 'loading',
dataAttr: 'data-data',
optgroupField: 'optgroup',
valueField: 'value',
labelField: 'text',
disabledField: 'disabled',
optgroupLabelField: 'label',
optgroupValueField: 'value',
lockOptgroupOrder: false,
sortField: '$order',
searchField: ['text'],
searchConjunction: 'and',
respect_word_boundaries: true,
mode: null,
wrapperClass: '',
inputClass: '',
dropdownClass: '',
dropdownContentClass: '',
dropdownParent: null,
copyClassesToDropdown: true,
dropdownSize: {
sizeType: 'auto', // 'numberItems' or 'fixedHeight'
sizeValue: 'auto', // number of items or height value (px is default) or CSS height (px, rem, em, vh)
},
normalize: false,
ignoreOnDropwdownHeight: 'img, i',
search: true,
/*
load : null, // function(query, callback) { ... }
score : null, // function(search) { ... }
formatValueToKey : null, // function(key) { ... }
onInitialize : null, // function() { ... }
onChange : null, // function(value) { ... }
onItemAdd : null, // function(value, $item) { ... }
onItemRemove : null, // function(value, $item) { ... }
onClear : null, // function() { ... }
onOptionAdd : null, // function(value, data) { ... }
onOptionRemove : null, // function(value) { ... }
onOptionClear : null, // function() { ... }
onOptionGroupAdd : null, // function(id, data) { ... }
onOptionGroupRemove : null, // function(id) { ... }
onOptionGroupClear : null, // function() { ... }
onDropdownOpen : null, // function($dropdown) { ... }
onDropdownClose : null, // function($dropdown) { ... }
onType : null, // function(str) { ... }
onDelete : null, // function(values) { ... }
*/
render: {
/*
item: null,
optgroup: null,
optgroup_header: null,
option: null,
option_create: null
*/
}
};