x4js 2.3.5 → 2.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x4js",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "type": "module",
5
5
  "main": "src/x4.ts",
6
6
  "module": "src/x4.ts",
@@ -33,7 +33,7 @@ import { _tr } from '../../core/core_i18n';
33
33
 
34
34
  import "./gridview.module.scss"
35
35
 
36
- export type CellRenderer = (rec: DataRecord) => Component;
36
+ export type CellRenderer = (rec: DataRecord, col_id: any) => Component;
37
37
  export type CellClassifier = (data: any, rec: DataRecord, col: string ) => string; // return the cell computed class
38
38
 
39
39
  type ColType = "number" | "money" | "checkbox" | "date" | "string" | "image" | "percent" | "icon" | "date-time";
@@ -694,6 +694,11 @@ export class Gridview<P extends GridviewProps = GridviewProps, E extends Gridvie
694
694
  return null;
695
695
  }
696
696
 
697
+ if( column.renderer ) {
698
+ const cell = column.renderer( rec, col );
699
+ return cell;
700
+ }
701
+
697
702
  let cls = "";
698
703
  if( column.classifier ) {
699
704
  extra_cls.push( column.classifier( data, rec, col ) );