-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate aggrid into v33 #667
Changes from all commits
93e51fb
4aab7db
22f82dc
d942ac4
51c39fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -12,19 +12,10 @@ import 'ag-grid-community/styles/ag-grid.css'; | |||||||
import 'ag-grid-community/styles/ag-theme-alpine.css'; | ||||||||
import { Box, useTheme } from '@mui/material'; | ||||||||
import { useIntl } from 'react-intl'; | ||||||||
import { CellEditingStoppedEvent, ColumnState, SortChangedEvent } from 'ag-grid-community'; | ||||||||
import { CellEditingStoppedEvent, ColumnState, RowSelectionOptions, SortChangedEvent } from 'ag-grid-community'; | ||||||||
import { BottomRightButtons } from './BottomRightButtons'; | ||||||||
import { FieldConstants } from '../../../../utils/constants/fieldConstants'; | ||||||||
|
||||||||
export const ROW_DRAGGING_SELECTION_COLUMN_DEF = [ | ||||||||
{ | ||||||||
rowDrag: true, | ||||||||
headerCheckboxSelection: true, | ||||||||
checkboxSelection: true, | ||||||||
maxWidth: 50, | ||||||||
}, | ||||||||
]; | ||||||||
|
||||||||
const style = (customProps: any) => ({ | ||||||||
grid: (theme: any) => ({ | ||||||||
width: 'auto', | ||||||||
|
@@ -92,7 +83,7 @@ export interface CustomAgGridTableProps { | |||||||
defaultColDef: unknown; | ||||||||
pagination: boolean; | ||||||||
paginationPageSize: number; | ||||||||
suppressRowClickSelection: boolean; | ||||||||
rowSelection?: RowSelectionOptions | 'single' | 'multiple'; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would prefer
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dunno if the |
||||||||
alwaysShowVerticalScroll: boolean; | ||||||||
stopEditingWhenCellsLoseFocus: boolean; | ||||||||
} | ||||||||
|
@@ -106,11 +97,11 @@ export function CustomAgGridTable({ | |||||||
defaultColDef, | ||||||||
pagination, | ||||||||
paginationPageSize, | ||||||||
suppressRowClickSelection, | ||||||||
rowSelection, | ||||||||
alwaysShowVerticalScroll, | ||||||||
stopEditingWhenCellsLoseFocus, | ||||||||
...props | ||||||||
}: CustomAgGridTableProps) { | ||||||||
}: Readonly<CustomAgGridTableProps>) { | ||||||||
// FIXME: right type => Theme --> not defined there ( gridStudy and gridExplore definition not the same ) | ||||||||
const theme: any = useTheme(); | ||||||||
const [gridApi, setGridApi] = useState<any>(null); | ||||||||
|
@@ -243,11 +234,10 @@ export function CustomAgGridTable({ | |||||||
onGridReady={onGridReady} | ||||||||
getLocaleText={getLocaleText} | ||||||||
cacheOverflowSize={10} | ||||||||
rowSelection="multiple" | ||||||||
rowSelection={rowSelection || 'multiple'} | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
rowDragEntireRow | ||||||||
rowDragManaged | ||||||||
onRowDragEnd={(e) => move(getIndex(e.node.data), e.overIndex)} | ||||||||
suppressBrowserResizeObserver | ||||||||
columnDefs={columnDefs} | ||||||||
detailRowAutoHeight | ||||||||
onSelectionChanged={() => { | ||||||||
|
@@ -259,7 +249,6 @@ export function CustomAgGridTable({ | |||||||
getRowId={(row) => row.data[FieldConstants.AG_GRID_ROW_UUID]} | ||||||||
pagination={pagination} | ||||||||
paginationPageSize={paginationPageSize} | ||||||||
suppressRowClickSelection={suppressRowClickSelection} | ||||||||
alwaysShowVerticalScroll={alwaysShowVerticalScroll} | ||||||||
stopEditingWhenCellsLoseFocus={stopEditingWhenCellsLoseFocus} | ||||||||
{...props} | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still use the old styling system.
Suggested change
|
||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still use the old styling system.