Skip to content

Commit afd05ec

Browse files
committed
initial commit
1 parent 24dd6bd commit afd05ec

File tree

2 files changed

+46
-15
lines changed

2 files changed

+46
-15
lines changed

packages/devextreme/js/ui/data_grid.d.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,13 @@ export type Toolbar = {
19071907
* @deprecated Use Editing instead
19081908
*/
19091909
export type dxDataGridEditing<TRowData, TKey = any> = Editing<TRowData, TKey>;
1910-
1910+
/**
1911+
* @public
1912+
*/
1913+
export type EditingOptions<TRowData, TKey> = {
1914+
component?: dxDataGrid<TRowData, TKey>;
1915+
row?: Row<TRowData, TKey>;
1916+
};
19111917
/**
19121918
* @docid dxDataGridEditing
19131919
* @public
@@ -1928,7 +1934,7 @@ export type Editing<TRowData = any, TKey = any> = EditingBase<TRowData, TKey> &
19281934
* @type_function_param1_field row:dxDataGridRowObject
19291935
* @public
19301936
*/
1931-
allowDeleting?: boolean | ((options: { component?: dxDataGrid<TRowData, TKey>; row?: Row<TRowData, TKey> }) => boolean);
1937+
allowDeleting?: boolean | ((options: EditingOptions<TRowData, TKey>) => boolean);
19321938
/**
19331939
* @docid dxDataGridOptions.editing.allowUpdating
19341940
* @default false
@@ -1937,7 +1943,7 @@ export type Editing<TRowData = any, TKey = any> = EditingBase<TRowData, TKey> &
19371943
* @type_function_param1_field row:dxDataGridRowObject
19381944
* @public
19391945
*/
1940-
allowUpdating?: boolean | ((options: { component?: dxDataGrid<TRowData, TKey>; row?: Row<TRowData, TKey> }) => boolean);
1946+
allowUpdating?: boolean | ((options: EditingOptions<TRowData, TKey>) => boolean);
19411947
/**
19421948
* @docid dxDataGridOptions.editing.texts
19431949
* @public
@@ -2304,6 +2310,15 @@ export interface dxDataGridColumn<TRowData = any, TKey = any> extends ColumnBase
23042310
type?: DataGridCommandColumnType;
23052311
}
23062312

2313+
/**
2314+
* @public
2315+
*/
2316+
export type ColumnButtonOptions<TRowData, TKey> = {
2317+
component?: dxDataGrid<TRowData, TKey>;
2318+
row?: Row<TRowData, TKey>;
2319+
column?: Column<TRowData, TKey>;
2320+
};
2321+
23072322
/**
23082323
* @public
23092324
*/
@@ -2339,22 +2354,24 @@ export interface dxDataGridColumnButton<TRowData = any, TKey = any> extends Colu
23392354
* @docid dxDataGridColumnButton.visible
23402355
* @default true
23412356
* @type boolean | function
2357+
* @type_function_param1 options: ColumnButtonOptions<TRowData, TKey>
23422358
* @type_function_param1_field component:dxDataGrid
23432359
* @type_function_param1_field row:dxDataGridRowObject
23442360
* @type_function_param1_field column:dxDataGridColumn
23452361
* @public
23462362
*/
2347-
visible?: boolean | ((options: { component?: dxDataGrid<TRowData, TKey>; row?: Row<TRowData, TKey>; column?: Column<TRowData, TKey> }) => boolean);
2363+
visible?: boolean | ((options: ColumnButtonOptions<TRowData, TKey>) => boolean);
23482364
/**
23492365
* @docid dxDataGridColumnButton.disabled
23502366
* @default false
23512367
* @type boolean | function
2368+
* @type_function_param1 options: ColumnButtonOptions<TRowData, TKey>
23522369
* @type_function_param1_field component:dxDataGrid
23532370
* @type_function_param1_field row:dxDataGridRowObject
23542371
* @type_function_param1_field column:dxDataGridColumn
23552372
* @public
23562373
*/
2357-
disabled?: boolean | ((options: { component?: dxDataGrid<TRowData, TKey>; row?: Row<TRowData, TKey>; column?: Column<TRowData, TKey> }) => boolean);
2374+
disabled?: boolean | ((options: ColumnButtonOptions<TRowData, TKey>) => boolean);
23582375
}
23592376

23602377
/**

packages/devextreme/js/ui/tree_list.d.ts

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,13 @@ export type dxTreeListOptions<TRowData = any, TKey = any> = Omit<GridBaseOptions
11491149
* @deprecated Use Editing instead
11501150
*/
11511151
export type dxTreeListEditing<TRowData = any, TKey = any> = Editing<TRowData, TKey>;
1152-
1152+
/**
1153+
* @public
1154+
*/
1155+
export type TreeListEditingOptions<TRowData, TKey> = {
1156+
component?: dxTreeList<TRowData, TKey>;
1157+
row?: Row<TRowData, TKey>;
1158+
};
11531159
/**
11541160
* @docid dxTreeListEditing
11551161
* @public
@@ -1164,7 +1170,7 @@ export interface Editing<TRowData = any, TKey = any> extends EditingBase<TRowDat
11641170
* @type_function_param1_field row:dxTreeListRowObject
11651171
* @public
11661172
*/
1167-
allowAdding?: boolean | ((options: { readonly component: dxTreeList<TRowData, TKey>; readonly row?: Row<TRowData, TKey> }) => boolean);
1173+
allowAdding?: boolean | ((options: TreeListEditingOptions<TRowData, TKey>) => boolean);
11681174
/**
11691175
* @docid dxTreeListOptions.editing.allowDeleting
11701176
* @default false
@@ -1173,7 +1179,7 @@ export interface Editing<TRowData = any, TKey = any> extends EditingBase<TRowDat
11731179
* @type_function_param1_field row:dxTreeListRowObject
11741180
* @public
11751181
*/
1176-
allowDeleting?: boolean | ((options: { readonly component: dxTreeList<TRowData, TKey>; readonly row?: Row<TRowData, TKey> }) => boolean);
1182+
allowDeleting?: boolean | ((options: TreeListEditingOptions<TRowData, TKey>) => boolean);
11771183
/**
11781184
* @docid dxTreeListOptions.editing.allowUpdating
11791185
* @default false
@@ -1182,7 +1188,7 @@ export interface Editing<TRowData = any, TKey = any> extends EditingBase<TRowDat
11821188
* @type_function_param1_field row:dxTreeListRowObject
11831189
* @public
11841190
*/
1185-
allowUpdating?: boolean | ((options: { readonly component: dxTreeList<TRowData, TKey>; readonly row?: Row<TRowData, TKey> }) => boolean);
1191+
allowUpdating?: boolean | ((options: TreeListEditingOptions<TRowData, TKey>) => boolean);
11861192
/**
11871193
* @docid dxTreeListOptions.editing.texts
11881194
* @type object
@@ -1589,7 +1595,14 @@ export interface dxTreeListColumn<TRowData = any, TKey = any> extends ColumnBase
15891595
* @public
15901596
*/
15911597
export type ColumnButton<TRowData = any, TKey = any> = dxTreeListColumnButton<TRowData, TKey>;
1592-
1598+
/**
1599+
* @public
1600+
*/
1601+
export type TreeListColumnButtonOptions<TRowData, TKey> = {
1602+
component?: dxTreeList<TRowData, TKey>;
1603+
row?: Row<TRowData, TKey>;
1604+
column?: Column<TRowData, TKey>;
1605+
};
15931606
/**
15941607
* @namespace DevExpress.ui
15951608
* @deprecated Use the TreeList's ColumnButton type instead
@@ -1625,12 +1638,13 @@ export interface dxTreeListColumnButton<TRowData = any, TKey = any> extends Colu
16251638
* @docid dxTreeListColumnButton.visible
16261639
* @default true
16271640
* @type boolean | function
1628-
* @type_function_param1_field component:dxTreeList
1629-
* @type_function_param1_field row:dxTreeListRowObject
1630-
* @type_function_param1_field column:dxTreeListColumn
1641+
* @type_function_param1 options: TreeListColumnButtonOptions<TRowData, TKey>
1642+
* @type_function_param1_field component: dxTreeList
1643+
* @type_function_param1_field row: dxTreeListRowObject
1644+
* @type_function_param1_field column: dxTreeListColumn
16311645
* @public
16321646
*/
1633-
visible?: boolean | ((options: { readonly component: dxTreeList<TRowData, TKey>; readonly row?: Row<TRowData, TKey>; readonly column: Column<TRowData, TKey> }) => boolean);
1647+
visible?: boolean | ((options: TreeListColumnButtonOptions<TRowData, TKey>) => boolean);
16341648
/**
16351649
* @docid dxTreeListColumnButton.disabled
16361650
* @default false
@@ -1640,7 +1654,7 @@ export interface dxTreeListColumnButton<TRowData = any, TKey = any> extends Colu
16401654
* @type_function_param1_field column:dxTreeListColumn
16411655
* @public
16421656
*/
1643-
disabled?: boolean | ((options: { readonly component: dxTreeList<TRowData, TKey>; readonly row?: Row<TRowData, TKey>; readonly column: Column<TRowData, TKey> }) => boolean);
1657+
disabled?: boolean | ((options: TreeListColumnButtonOptions<TRowData, TKey>) => boolean);
16441658
}
16451659

16461660
/**

0 commit comments

Comments
 (0)