File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
packages/core/src/js/factories Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1128,14 +1128,23 @@ angular.module('ui.grid')
1128
1128
*/
1129
1129
Grid . prototype . findRowByKey = function findRowByKey ( isInEntity , key , comparator , lookInRows ) {
1130
1130
lookInRows = lookInRows == void 0 ? this . rows : lookInRows ;
1131
+ var result = null ;
1131
1132
var func = isInEntity ? function ( row ) {
1132
- return row . entity != void 0 && row . entity [ key ] === comparator ;
1133
+ if ( row . entity != void 0 && row . entity [ key ] === comparator ) {
1134
+ result = row ;
1135
+ return false ;
1136
+ }
1137
+ return true ;
1133
1138
} : function ( row ) {
1134
- return row [ key ] === comparator ;
1139
+ if ( row [ key ] === comparator ) {
1140
+ result = row ;
1141
+ return false ;
1142
+ }
1143
+ return true ;
1135
1144
}
1136
1145
1137
- rows = lookInRows . filter ( func ) ;
1138
- return rows . length > 0 ? rows [ 0 ] : null ;
1146
+ lookInRows . every ( func ) ;
1147
+ return result
1139
1148
} ;
1140
1149
1141
1150
/**
You can’t perform that action at this time.
0 commit comments