You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/config/toolbar_items_config.md
+33-10Lines changed: 33 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,14 @@ items?: [
21
21
{
22
22
id: string,
23
23
label: string,
24
-
searchRule?: (card, value, by) => {} // returns a boolean value
24
+
searchRule?: (card, value, by) => {
25
+
return boolean
26
+
}
25
27
}, {...}
26
-
]
28
+
],
29
+
resultTemplate?:template(searchResult=> {
30
+
return"The HTML template of the search result";
31
+
})
27
32
},
28
33
"sort"| {
29
34
// sort parameters
@@ -34,8 +39,7 @@ items?: [
34
39
by?: string, // by?: ((card: object) => any),
35
40
dir?:"asc"|"desc"
36
41
}, {...}
37
-
]
38
-
42
+
]
39
43
},
40
44
"spacer",
41
45
"undo",
@@ -57,18 +61,21 @@ In the **items** array you can specify the following parameters:
57
61
-`type` - (required) a type of control (*"search"*)
58
62
-`options` - (optional) an array of objects, that define the search parameters. For each object (*search option*) you can specify the following parameters:
59
63
-`id` - (required) a key of card field, by which the cards will be searched
60
-
-`label` - (required) a name of option, used in a dropdown list of the searchbar selector
64
+
-`label` - (required) a name of option, used in a dropdown list of the search bar selector
61
65
-`searchRule` (optional) - a custom function that allows defining search rules. It takes the following arguments:
62
66
-***card*** - an object of the card data
63
-
-***value*** - a searched value, specified in the searchbar
67
+
-***value*** - a searched value, specified in the search bar
64
68
-***by*** - a key of card field, by which the cards will be searched
69
+
-`searchResult` - (optional) a template for displaying the custom search result
0 commit comments