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
{{ message }}
This repository was archived by the owner on Aug 7, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: packages/oui-select/README.md
+17
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,22 @@
68
68
</oui-select>
69
69
```
70
70
71
+
### Disabled Items
72
+
73
+
```html:preview
74
+
<oui-select name="country"
75
+
model="$ctrl.country"
76
+
data-title="Select a country"
77
+
placeholder="Select a country..."
78
+
items="$ctrl.countries"
79
+
disable-items="$ctrl.disableItems($item)"
80
+
required
81
+
match="name"
82
+
data-align="start">
83
+
<span ng-bind="$item.name"></span>
84
+
</oui-select>
85
+
```
86
+
71
87
### On Change
72
88
73
89
**Note**: Model will not be refreshed until the `on-change` callback hasn't returned. If you want to access the new model inside the `on-change` callback you need to use the `modelValue` variable as below.
@@ -110,6 +126,7 @@
110
126
| `placeholder` | string | @? | yes | n/a | n/a | placeholder displayed when model is undefined
111
127
| `match` | string | @? | no | n/a | n/a | property of item to show as selected item
112
128
| `items` | array | < | no | n/a | n/a | array used to populate the list
129
+
| `disable-items`| function | & | no | n/a | n/a | predicate to determine items to disable
113
130
| `required` | boolean | <? | no | `true`, `false` | `false` | define if the field is required
114
131
| `disabled` | boolean | <? | no | `true`, `false` | `false` | define if the field is disabled
115
132
| `group-by` | function | <? | no | n/a | n/a | function taking an item as parameter and returning the group name as as string
0 commit comments