File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ angular.module('mgcrea.ngStrap.helpers.parseOptions', [])
8
8
regexp : / ^ \s * ( .* ?) (?: \s + a s \s + ( .* ?) ) ? (?: \s + g r o u p \s + b y \s + ( .* ) ) ? \s + f o r \s + (?: ( [ \$ \w ] [ \$ \w ] * ) | (?: \( \s * ( [ \$ \w ] [ \$ \w ] * ) \s * , \s * ( [ \$ \w ] [ \$ \w ] * ) \s * \) ) ) \s + i n \s + ( .* ?) (?: \s + t r a c k \s + b y \s + ( .* ?) ) ? $ /
9
9
} ;
10
10
11
- this . $get = function ( $parse , $q ) {
11
+ this . $get = function ( $parse , $q , $filter ) {
12
12
13
13
function ParseOptionsFactory ( attr , config ) {
14
14
@@ -28,12 +28,13 @@ angular.module('mgcrea.ngStrap.helpers.parseOptions', [])
28
28
keyName = match [ 5 ] ,
29
29
groupByFn = $parse ( match [ 3 ] || '' ) ,
30
30
valueFn = $parse ( match [ 2 ] ? match [ 1 ] : valueName ) ,
31
- valuesFn = $parse ( match [ 7 ] ) ;
31
+ valuesFn = $parse ( match [ 7 ] . split ( '|' ) [ 0 ] ) ;
32
32
} ;
33
33
34
34
$parseOptions . valuesFn = function ( scope , controller ) {
35
35
return $q . when ( valuesFn ( scope , controller ) )
36
36
. then ( function ( values ) {
37
+ values = $filter ( 'filter' ) ( values , controller . $viewValue ) ;
37
38
$parseOptions . $values = values ? parseValues ( values , scope ) : { } ;
38
39
return $parseOptions . $values ;
39
40
} ) ;
You can’t perform that action at this time.
0 commit comments