File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,7 @@ $.widget("spf.menugrid", {
25
25
} ) ;
26
26
27
27
inputs . find ( "input" ) . bind ( "change" , function ( ) {
28
- var head = $ ( this ) . parent ( ) ,
29
- field = head . data ( "field" ) ,
30
- type = head . data ( "type" ) ,
28
+ var column = grid . options . columns [ this . parentNode . cellIndex ] ,
31
29
value = this . value ,
32
30
operator ;
33
31
@@ -36,20 +34,20 @@ $.widget("spf.menugrid", {
36
34
value = value . substring ( operator . length ) ;
37
35
value = value == null || isNaN ( value ) ? "" : value ;
38
36
}
39
- if ( type === "number" ) {
37
+ if ( column . type === "number" ) {
40
38
value = parseFloat ( value ) ;
41
39
operator = operator || "==" ;
42
40
}
43
- if ( type === "string" ) {
41
+ if ( column . type === "string" ) {
44
42
operator = "like" ;
45
43
}
46
44
if ( value ) {
47
- source . option ( "filter." + field , {
45
+ source . option ( "filter." + column . property , {
48
46
operator : operator ,
49
47
value : value
50
48
} ) ;
51
49
} else {
52
- source . option ( "filter." + field , null ) ;
50
+ source . option ( "filter." + column . property , null ) ;
53
51
}
54
52
source . refresh ( ) ;
55
53
} ) ;
You can’t perform that action at this time.
0 commit comments