Skip to content
This repository was archived by the owner on Jan 22, 2018. It is now read-only.

Commit b45ae4b

Browse files
author
Kamil Kisiela
committed
docs(select): add onClose and onOpen
1 parent acbf87d commit b45ae4b

File tree

1 file changed

+48
-21
lines changed

1 file changed

+48
-21
lines changed

docs/types/select.md

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,68 @@
1-
# select
2-
## md-select
1+
select
2+
======
3+
4+
md-select
5+
---------
36

47
### Example
58

69
```javascript
710
{
8-
"type": "select",
9-
"key": "name",
10-
"templateOptions": {
11-
"label": "Name",
12-
"theme": "custom",
13-
"multiple": true,
14-
"labelProp": "firstName",
15-
"valueProp": "id",
16-
"options": [
17-
{"firstName": "Sarah", id: 1},
18-
{"firstName": "Jessica", id: 2},
19-
{"firstName": "Parker", id: 3}
20-
]
11+
type: "select",
12+
key: "name",
13+
templateOptions: {
14+
label: "Name",
15+
theme: "custom",
16+
multiple: true,
17+
labelProp: "firstName",
18+
valueProp: "id",
19+
options: [
20+
{firstName: "Sarah", id: 1},
21+
{firstName: "Jessica", id: 2},
22+
{firstName: "Parker", id: 3}
23+
],
24+
onOpen: () => {
25+
console.log('select is opened');
26+
},
27+
onClose: () => {
28+
console.log('select is closed');
29+
}
2130
}
2231
}
2332
```
2433

2534
### Configuration
2635

27-
#### templateOptions.label _: string_
36+
#### templateOptions.label *: string*
37+
38+
#### templateOptions.theme *: string*
2839

29-
#### templateOptions.theme _: string_
40+
#### templateOptions.options *: array*
3041

31-
#### templateOptions.options _: array_
3242
Array with available options
3343

34-
#### templateOptions.labelProp _: string (default: name)_
44+
#### templateOptions.labelProp *: string (default: name)*
45+
3546
Name of property with option's label
3647

37-
#### templateOptions.valueProp _: string_
48+
#### templateOptions.valueProp *: string*
49+
3850
Name of property with option's value
3951

40-
#### templateOptions.multiple _: boolean_
52+
#### templateOptions.multiple *: boolean*
53+
4154
Multiple choice
55+
56+
#### templateOptions.onOpen *: function*
57+
58+
Bound to md-on-open.
59+
60+
Expression to be evaluated when the select is opened.
61+
62+
If expression returns a promise, it will display a loading indicator while it is being resolved.
63+
64+
#### templateOptions.onClose *: function*
65+
66+
Bound to md-on-close.
67+
68+
Expression to be evaluated when the select is closed.

0 commit comments

Comments
 (0)