From cf26da0f153d5d47d1232f0bee8401b04013b0f5 Mon Sep 17 00:00:00 2001 From: Mikhail Preyskurantov Date: Fri, 22 Sep 2023 09:52:16 +0300 Subject: [PATCH] Fix onClick event for column button (#25644) --- js/ui/data_grid.d.ts | 22 +++++++++++++++------- ts/dx.all.d.ts | 9 +++++++++ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/js/ui/data_grid.d.ts b/js/ui/data_grid.d.ts index e18d3ab6d8e7..5f53ef748fbe 100644 --- a/js/ui/data_grid.d.ts +++ b/js/ui/data_grid.d.ts @@ -1035,9 +1035,22 @@ export type RowDraggingRemoveEvent = ReducedNativeEv /** @public */ export type RowDraggingReorderEvent = ReducedNativeEventInfo> & RowDraggingEventInfo & DragReorderInfo; -/** @public */ +/** + * @docid _ui_data_grid_ColumnButtonClickEvent + * @public + * @type object + * @inherits NativeEventInfo + */ export type ColumnButtonClickEvent = NativeEventInfo, PointerEvent | MouseEvent> & { + /** + * @docid _ui_data_grid_ColumnButtonClickEvent.row + * @type dxDataGridRowObject + */ row?: Row; + /** + * @docid _ui_data_grid_ColumnButtonClickEvent.column + * @type dxDataGridColumn + */ column?: Column; }; @@ -2303,12 +2316,7 @@ export interface dxDataGridColumnButton extends Colu name?: DataGridPredefinedColumnButton | string; /** * @docid dxDataGridColumnButton.onClick - * @type_function_param1 e:object - * @type_function_param1_field component:dxDataGrid - * @type_function_param1_field model:object - * @type_function_param1_field event:event - * @type_function_param1_field row:dxDataGridRowObject - * @type_function_param1_field column:dxDataGridColumn + * @type_function_param1 e:{ui/data_grid:ColumnButtonClickEvent} * @public */ onClick?: ((e: ColumnButtonClickEvent) => void); diff --git a/ts/dx.all.d.ts b/ts/dx.all.d.ts index 3b475ac5abae..758f9f6909cc 100644 --- a/ts/dx.all.d.ts +++ b/ts/dx.all.d.ts @@ -9970,6 +9970,9 @@ declare module DevExpress.ui { * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export type ColumnButtonBase = DevExpress.common.grids.ColumnButtonBase; + /** + * [descr:_ui_data_grid_ColumnButtonClickEvent] + */ export type ColumnButtonClickEvent< TRowData = any, TKey = any @@ -9977,7 +9980,13 @@ declare module DevExpress.ui { dxDataGrid, PointerEvent | MouseEvent > & { + /** + * [descr:_ui_data_grid_ColumnButtonClickEvent.row] + */ row?: Row; + /** + * [descr:_ui_data_grid_ColumnButtonClickEvent.column] + */ column?: Column; }; export type ColumnButtonTemplateData = {