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
- Bug Fix: Checking the existence of array of dropdown list.
- Added “multiSelect” on or off feature. Also, auto CSS fix based on
“multiSelect” property.
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ $scope.options = [ {
57
57
```
58
58
59
59
<h4>dropdown-trackby</h4>
60
-
<p>Initially, dropdown items are tracked by <code>Id</code> automagically, if the <code>dropdown-trackby</code> attribute is not set.</p>
60
+
<p>Initially, dropdown items are tracked by <code>Id</code> automagically (considering "Id" property is present in all objects in an array), if the <code>dropdown-trackby</code> attribute is not set.</p>
61
61
<p>If the option objects does not have <code>Id</code> property, then custom tracking could be set by providing any of the property of an object from the options data.</p>
<p>It is always better to provide <code>dropdown-trackby</code> attribute for correct tracking.</p>
79
+
<p><em>NOTE: </em> It is always better to provide <code>dropdown-trackby</code> attribute for correct tracking, when <code>dropdown-options</code> is being used.</p>
80
80
81
81
<h4>dropdown-disable</h4>
82
-
<p>Dropdown could be disabled by providing boolean value to <code>dropdown-disable</code> attribute.</p>
82
+
<p>Dropdown could be disabled by directly providing boolean value to <code>dropdown-disable</code> attribute.</p>
Configure the options from the controller to set <code>dropdown-config</code>.
116
-
<p><em>NOTE: </em> When <code>dropdown-config</code> is being used, it will overwrite <code>dropdown-options</code> and <code>dropdown-trackby</code> attribute, if in use.</p>
115
+
Configure the options from the controller to set <code>dropdown-config</code> attribute.
116
+
<p><em>NOTE: </em> When <code>dropdown-config</code> is being used, it will overwrite <code>dropdown-options</code> and <code>dropdown-trackby</code> attribute, if in use. Therefore, it's better to use just one at a time.</p>
117
117
<p>Available <code>config</code> options:
118
118
<pre>
119
119
options,
@@ -134,6 +134,7 @@ Configure the options from the controller to set <code>dropdown-config</code>.
134
134
<h6>displayBadge:</h6> <p>Badge on the dropdown button that displays the total number of selected items from the dropdown list. Default visibility is <code>true</code>, but could be set to <code>false</code>.</p>
135
135
<h6>height:</h6> <p>Height of the scrollable item list in a dropdown-box, in pixel. Default height is set to <code>200px</code>.</p>
136
136
<h6>filter:</h6> <p>Filter/search items from the dropdown list. Default visibility is <code>false</code>, but could be set to <code>true</code>.</p>
137
+
<h6>multiSelect:</h6> <p>Turn multi-select list items "on" or "off". Default is <code>true</code>, but could be turned "off" by setting <code>false</code>.</p>
throw'Error: Missing array for dropdown list. Consider providing array through [dropdown-options] or [dropdown-config] attribute in the directive tag.';
85
+
}
86
+
87
+
// check if dropdownOptions is defined or not
88
+
if(angular.isDefined($scope.dropdownOptions)){
89
+
// setting dropdown list items
90
+
$scope.options=$scope.dropdownOptions;
91
+
92
+
// auto assigning left display value and right display value
0 commit comments