From ade29a018c3115f2898fbe643290cf958c9f6f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Marenco?= Date: Fri, 10 Mar 2017 17:46:52 -0500 Subject: [PATCH] Add customEditor property (#14857) Hi! I was having this issue while using the library: ``` ERROR in [at-loader] frontend/src/components/modals/Upload.tsx:538:40 TS2339: Property 'customEditor' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes>...'. ``` It seems it is missing from the Definition file, so I just added it :). Hope it helps! --- react-bootstrap-table/index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/react-bootstrap-table/index.d.ts b/react-bootstrap-table/index.d.ts index 82384f0d9f..9adfacf8c8 100644 --- a/react-bootstrap-table/index.d.ts +++ b/react-bootstrap-table/index.d.ts @@ -475,6 +475,13 @@ export interface TableHeaderColumnProps extends Props { This function taking one arguments: order which present the sort order currently. */ caretRender?: Function; + /** + Give an Object like following to able to customize your own editing component. + This Object should contain these two property: + getElement(REQUIRED): Accept a callback function and take two arguments: onUpdate and props. + customEditorParameters: Another extra data for custom cell edit component. + */ + customEditor?: {getElement: (onUpdate: any, props: any) => ReactElement, customEditorParameters?: Object} ; /** To customize the column. This callback function should return a String or a React Component. In addition, this function taking two argument: cell and row.