Use converted value if colum uses a lookup table
authorJoey Schulze <joey@infodrom.org>
Mon, 21 Sep 2015 10:21:29 +0000 (12:21 +0200)
committerJoey Schulze <joey@infodrom.org>
Mon, 21 Sep 2015 10:21:29 +0000 (12:21 +0200)
This will improve filtering a lot since converted values make more
sense than the real values

minsrc/ricoLiveGrid.js

index 1afb5d6..4087336 100644 (file)
@@ -927,7 +927,9 @@ Rico.LiveGridMethods = {
         for (var i=0; i<rows.length; i++) {
           if (rows[i].length>0) {
             c=rows[i][0];
-            opt=Rico.addSelectOption(col.filterField,c,c || Rico.getPhraseById("filterBlank"));
+           ctrans=c;
+           if (col._getdesc) ctrans = col._getdesc(c);
+           opt=Rico.addSelectOption(col.filterField,c,ctrans || Rico.getPhraseById("filterBlank"));
             if (col.filterType==Rico.ColumnConst.USERFILTER && c==v) opt.selected=true;
           }
         }