diff --git a/app/js/directives/directive-component-select.js b/app/js/directives/directive-component-select.js index c729d6d9..2f0b851b 100755 --- a/app/js/directives/directive-component-select.js +++ b/app/js/directives/directive-component-select.js @@ -3,12 +3,12 @@ angular.module('app').directive('componentSelect', function () { // Generting the HTML in this manner is MUCH faster than using an angular template. function appendGroup(list, opts, cid, mass) { - var prevClass = null; + var prevClass = null, prevRating = null; for (var i = 0; i < opts.length; i++) { var o = opts[i]; var id = o.id || (o.class + o.rating); // Common components' ID is their class and rating - if(i > 0 && opts.length > 3 && o.class != prevClass && o.grp != 'cr') { + if(i > 0 && opts.length > 3 && o.class != prevClass && (!o.grp || o.rating != prevRating || o.mode)) { list.push('
'); } @@ -37,6 +37,7 @@ angular.module('app').directive('componentSelect', function () { list.push(''); prevClass = o.class; + prevRating= o.rating; } }