From 2d76f0cafc8978ad5973e5d349fdb81b29262ef4 Mon Sep 17 00:00:00 2001 From: Mikhail Chechnev Date: Wed, 10 Apr 2024 17:08:13 +0300 Subject: [PATCH] =?UTF-8?q?WEB=20APP:=20P8PDataGrid,=20P8PTable=20-=20?= =?UTF-8?q?=D1=83=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=82=D0=B5=D0=B9=D0=BD=D0=B5=D1=80=D0=BE?= =?UTF-8?q?=D0=BC=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/p8p_data_grid.js | 6 ++++++ app/components/p8p_table.js | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/components/p8p_data_grid.js b/app/components/p8p_data_grid.js index 98525be..7ccfd73 100644 --- a/app/components/p8p_data_grid.js +++ b/app/components/p8p_data_grid.js @@ -54,6 +54,8 @@ const P8PDataGrid = ({ groupCellRender, rowExpandRender, valueFormatter, + containerComponent, + containerComponentProps, onOrderChanged, onFilterChanged, onPagesCountChanged, @@ -129,6 +131,8 @@ const P8PDataGrid = ({ rowExpandRender={rowExpandRender} valueFormatter={valueFormatter} objectsCopier={objectsCopier} + containerComponent={containerComponent} + containerComponentProps={containerComponentProps} onOrderChanged={handleOrderChanged} onFilterChanged={handleFilterChanged} onPagesCountChanged={handlePagesCountChanged} @@ -162,6 +166,8 @@ P8PDataGrid.propTypes = { groupCellRender: PropTypes.func, rowExpandRender: PropTypes.func, valueFormatter: PropTypes.func, + containerComponent: PropTypes.oneOfType([PropTypes.elementType, PropTypes.string]), + containerComponentProps: PropTypes.object, onOrderChanged: PropTypes.func, onFilterChanged: PropTypes.func, onPagesCountChanged: PropTypes.func, diff --git a/app/components/p8p_table.js b/app/components/p8p_table.js index 27d970c..b81947d 100644 --- a/app/components/p8p_table.js +++ b/app/components/p8p_table.js @@ -482,7 +482,9 @@ const P8PTable = ({ onOrderChanged, onFilterChanged, onPagesCountChanged, - objectsCopier + objectsCopier, + containerComponent, + containerComponentProps }) => { //Собственное состояние - описание заголовка const [header, dispatchHeaderAction] = useReducer(p8pTableReducer, HEADER_INITIAL_STATE()); @@ -682,7 +684,8 @@ const P8PTable = ({ valueFormatter={valueFormatter} /> ) : null} - + + {header.displayLevels.map(level => ( @@ -868,7 +871,9 @@ P8PTable.propTypes = { onOrderChanged: PropTypes.func, onFilterChanged: PropTypes.func, onPagesCountChanged: PropTypes.func, - objectsCopier: PropTypes.func.isRequired + objectsCopier: PropTypes.func.isRequired, + containerComponent: PropTypes.oneOfType([PropTypes.elementType, PropTypes.string]), + containerComponentProps: PropTypes.object }; //----------------