Repository navigation
Expand file tree
/
Copy pathdefaults.js
More file actions
72 lines (65 loc) · 1.65 KB
/
Copy pathdefaults.js
File metadata and controls
72 lines (65 loc) · 1.65 KB
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
const defaults = {
/**
* Called once after the DK element is inserted into the DOM.
* The value of `this` is the Dropkick object itself.
*
* @config initialize
* @type Function
*
*/
initialize() {},
/**
* Whether or not you would like Dropkick to render on mobile devices.
*
* @default false
* @property {boolean} mobile
* @type boolean
*
*/
mobile: true,
/**
* Called whenever the value of the Dropkick select changes (by user action or through the API).
* The value of `this` is the Dropkick object itself.
*
* @config change
* @type Function
*
*/
change() {},
/**
* Called whenever the Dropkick select is opened. The value of `this` is the Dropkick object itself.
*
* @config open
* @type Function
*
*/
open() {},
/**
* Called whenever the Dropkick select is closed. The value of `this` is the Dropkick object itself.
*
* @config close
* @type Function
*
*/
close() {},
// Search method; "strict", "partial", or "fuzzy"
/**
* `"strict"` - The search string matches exactly from the beginning of the option's text value (case insensitive).
*
* `"partial"` - The search string matches part of the option's text value (case insensitive).
*
* `"fuzzy"` - The search string matches the characters in the given order (not exclusively).
* The strongest match is selected first. (case insensitive).
*
* @default "strict"
* @config search
* @type string
*
*/
search: "strict",
/**
* Bubble up the custom change event attached to Dropkick to the original element (select).
*/
bubble: true
};
export default defaults;