@azrico/reactgrid 1.1.32 → 1.2.1

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.
@@ -65,4 +65,16 @@ export type AzGridProps = {
65
65
  className?: string;
66
66
  };
67
67
  export declare function AzGrid(props: AzGridProps): JSX.Element;
68
+ /**
69
+ * Gets name of a column from its column object
70
+ * @param obj
71
+ * @returns
72
+ */
73
+ export declare function get_col_name(obj: any): string;
74
+ /**
75
+ * Gets header of a column
76
+ * @param obj
77
+ * @returns
78
+ */
79
+ export declare function get_col_header(obj: any): string;
68
80
  export default AzGrid;
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.AzGrid = AzGrid;
7
7
  exports.default = void 0;
8
+ exports.get_col_header = get_col_header;
9
+ exports.get_col_name = get_col_name;
8
10
  require("@inovua/reactdatagrid-enterprise/index.css");
9
11
  require("@inovua/reactdatagrid-enterprise/theme/default-dark.css");
10
12
  require("@inovua/reactdatagrid-enterprise/theme/amber-dark.css");
@@ -44,7 +46,7 @@ const defaultOptions = {
44
46
  editStartEvent: 'click',
45
47
  rowReorderColumn: false,
46
48
  resizable: true,
47
- columnUserSelect: "text",
49
+ columnUserSelect: true,
48
50
  rowIndexColumn: true,
49
51
  rowHeight: 35,
50
52
  maxRowHeight: 40,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.1.32",
3
+ "version": "1.2.1",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
@@ -144,7 +144,7 @@ const defaultOptions: GridOptions = {
144
144
  editStartEvent: 'click',
145
145
  rowReorderColumn: false,
146
146
  resizable: true,
147
- columnUserSelect:"text",
147
+ columnUserSelect: true,
148
148
  rowIndexColumn: true,
149
149
  rowHeight: 35,
150
150
  maxRowHeight: 40,
@@ -594,7 +594,7 @@ function to_datasource(arr: any[], idProperty: string, valueAsID = true) {
594
594
  * @param obj
595
595
  * @returns
596
596
  */
597
- function get_col_name(obj: any): string {
597
+ export function get_col_name(obj: any): string {
598
598
  if (!obj) return '';
599
599
  if (typeof obj == 'string') return obj;
600
600
  if (typeof obj != 'object') return '';
@@ -605,7 +605,7 @@ function get_col_name(obj: any): string {
605
605
  * @param obj
606
606
  * @returns
607
607
  */
608
- function get_col_header(obj: any): string {
608
+ export function get_col_header(obj: any): string {
609
609
  if (!obj) return '';
610
610
  if (typeof obj == 'string') return obj;
611
611
  if (typeof obj != 'object') return '';