@azrico/reactgrid 1.3.35 → 1.3.36
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.
|
@@ -5,7 +5,7 @@ import '../themes/base_styles.css';
|
|
|
5
5
|
import '../themes/grid.css';
|
|
6
6
|
import { ConvertableToMenuItem } from '@azrico/controls';
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { TypeCellSelection, TypeColumn, TypeDataGridProps, TypeDataSource, TypeEditInfo, TypeFilterTypes, TypeFilterValue, TypeRowDetailsInfo, TypeRowProps, TypeRowSelection } from '@inovua/reactdatagrid-community/types';
|
|
8
|
+
import { TypeCellSelection, TypeColumn, TypeDataGridProps, TypeDataSource, TypeEditInfo, TypeFilterTypes, TypeFilterValue, TypeRowDetailsInfo, TypeRowProps, TypeRowSelection, TypeComputedProps } from '@inovua/reactdatagrid-community/types';
|
|
9
9
|
import { TypeOnSelectionChangeArg } from '@inovua/reactdatagrid-community/types/TypeDataGridProps';
|
|
10
10
|
export type ColumnDefinition = TypeColumn;
|
|
11
11
|
export type CellDefinition = any;
|
|
@@ -45,7 +45,7 @@ export type AzGridProps = {
|
|
|
45
45
|
details_columns?: LooseColumnDefinition[];
|
|
46
46
|
details_filter?: FilterValues;
|
|
47
47
|
licenseKey?: string;
|
|
48
|
-
gridRef?:
|
|
48
|
+
gridRef?: React.MutableRefObject<TypeComputedProps>;
|
|
49
49
|
gridOptions?: AzGridOptions;
|
|
50
50
|
columns?: LooseColumnDefinition[];
|
|
51
51
|
columnExtensions?: Partial<LooseColumnDefinition>;
|
|
@@ -362,7 +362,7 @@ function DataGridCore(props) {
|
|
|
362
362
|
...props.static_gridOptions,
|
|
363
363
|
...props.dynamic_gridOptions,
|
|
364
364
|
rowIndexColumn: true,
|
|
365
|
-
handle: ref => props.gridRef
|
|
365
|
+
handle: ref => props.gridRef = ref,
|
|
366
366
|
className: 'azgrid-flexed',
|
|
367
367
|
columns: props.columns,
|
|
368
368
|
dataSource: props.dataSource
|
package/package.json
CHANGED
package/src/views/DataGrid.tsx
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
TypeRowDetailsInfo,
|
|
27
27
|
TypeRowProps,
|
|
28
28
|
TypeRowSelection,
|
|
29
|
+
TypeComputedProps,
|
|
29
30
|
} from '@inovua/reactdatagrid-community/types';
|
|
30
31
|
import { fix_parent_child_relations, func_selection } from '../func/func_child';
|
|
31
32
|
import { array_intersection, fn_eval } from '@azrico/object';
|
|
@@ -81,7 +82,7 @@ export type AzGridProps = {
|
|
|
81
82
|
|
|
82
83
|
licenseKey?: string;
|
|
83
84
|
|
|
84
|
-
gridRef?:
|
|
85
|
+
gridRef?: React.MutableRefObject<TypeComputedProps>;
|
|
85
86
|
gridOptions?: AzGridOptions;
|
|
86
87
|
|
|
87
88
|
columns?: LooseColumnDefinition[];
|
|
@@ -134,6 +135,7 @@ type DataGridProps = ModifyFields<
|
|
|
134
135
|
type DataGridWrapperProps = ModifyFields<
|
|
135
136
|
DataGridProps,
|
|
136
137
|
{
|
|
138
|
+
gridRef: React.MutableRefObject<TypeComputedProps>;
|
|
137
139
|
static_gridOptions: AzGridOptions;
|
|
138
140
|
dynamic_gridOptions: AzGridOptions;
|
|
139
141
|
children?: React.ReactNode;
|
|
@@ -546,7 +548,7 @@ function DataGridCore(props: DataGridWrapperProps) {
|
|
|
546
548
|
{...props.static_gridOptions}
|
|
547
549
|
{...props.dynamic_gridOptions}
|
|
548
550
|
rowIndexColumn
|
|
549
|
-
handle={(ref) => (props.gridRef
|
|
551
|
+
handle={(ref) => (props.gridRef = ref as any)}
|
|
550
552
|
className={'azgrid-flexed'}
|
|
551
553
|
columns={props.columns}
|
|
552
554
|
dataSource={props.dataSource}
|