From 2f01c2f66dcf4a515a1f896fc8bc23ea1515eaa9 Mon Sep 17 00:00:00 2001 From: renato <rended83@gmail.com> Date: Fri, 10 Jun 2016 17:07:02 +0200 Subject: [PATCH] preselect bug --- controllets/providers-utility-controllet/providers-utility-controllet.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllets/providers-utility-controllet/providers-utility-controllet.html b/controllets/providers-utility-controllet/providers-utility-controllet.html index cf8f705..d7b866d 100644 --- a/controllets/providers-utility-controllet/providers-utility-controllet.html +++ b/controllets/providers-utility-controllet/providers-utility-controllet.html @@ -31,9 +31,9 @@ utility_getSelectedIndices = function(fields, selectedFileds) { console.log("we"); var selectedIndices = []; - for (var i = 0; i < fields.length; i++) - if($.inArray(fields[i], selectedFileds) > -1) - selectedIndices.push(i); + for (var i = 0; i < selectedFileds.length; i++) + if($.inArray(selectedFileds[i], fields) > -1) + selectedIndices.push(fields.indexOf(selectedFileds[i])); return selectedIndices; }; -- libgit2 0.21.4