Fix network selector filter at LB creation
Field for network select at LB create allows filtering of available nets by string input. Currently, filter correctly select nets which contain entered string somewhere in fields, but selects some other net when clicked. Provided patch fixes this behavior Story 2009246 Task 43419 Change-Id: I4b7f2e0f91bb1d46a31f8b996c81b135f886b6d3
This commit is contained in:
parent
33c308d3aa
commit
63330eb1e0
|
@ -134,6 +134,8 @@
|
|||
ctrl.isOpen = false;
|
||||
// Arrays of text to be displayed
|
||||
ctrl.rows = [];
|
||||
// Array of non-rendered options after filter apply
|
||||
ctrl.filtered_options = [];
|
||||
|
||||
// Lifecycle methods
|
||||
ctrl.$onInit = function() {
|
||||
|
@ -184,7 +186,7 @@
|
|||
};
|
||||
|
||||
ctrl.selectOption = function(index) {
|
||||
var option = ctrl.options[index];
|
||||
var option = ctrl.filtered_options[index];
|
||||
ctrl.onSelect({
|
||||
option: option
|
||||
});
|
||||
|
@ -218,11 +220,13 @@
|
|||
};
|
||||
|
||||
ctrl._buildRows = function() {
|
||||
ctrl.filtered_options.length = 0;
|
||||
ctrl.rows.length = 0;
|
||||
angular.forEach(ctrl.options, function(option) {
|
||||
var row = ctrl._buildRow(option);
|
||||
if (row) {
|
||||
ctrl.rows.push(row);
|
||||
ctrl.filtered_options.push(option);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue