Skip to content

Commit

Permalink
Resolve comments of PR #667 (#675)
Browse files Browse the repository at this point in the history
Signed-off-by: achour94 <[email protected]>
  • Loading branch information
achour94 authored Jan 22, 2025
1 parent 9578077 commit de2bb88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/customAGGrid/customAggrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const CustomAGGrid = React.forwardRef<AgGridReact, CustomAGGridProps>((pr
getLocaleText={getLocaleText}
onColumnResized={onColumnResized}
enableCellTextSelection
theme="legacy"
{...agGridReactProps}
/>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

import { useCallback, useEffect, useState } from 'react';
import { useFieldArray, useFormContext } from 'react-hook-form';
import { AgGridReact } from 'ag-grid-react';
import { AgGridReact, AgGridReactProps } from 'ag-grid-react';
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, RowSelectionOptions, SortChangedEvent } from 'ag-grid-community';
import { CellEditingStoppedEvent, ColumnState, SortChangedEvent } from 'ag-grid-community';
import { BottomRightButtons } from './BottomRightButtons';
import { FieldConstants } from '../../../../utils/constants/fieldConstants';

Expand Down Expand Up @@ -83,7 +83,7 @@ export interface CustomAgGridTableProps {
defaultColDef: unknown;
pagination: boolean;
paginationPageSize: number;
rowSelection?: RowSelectionOptions | 'single' | 'multiple';
rowSelection?: AgGridReactProps['rowSelection'];
alwaysShowVerticalScroll: boolean;
stopEditingWhenCellsLoseFocus: boolean;
}
Expand Down Expand Up @@ -234,7 +234,7 @@ export function CustomAgGridTable({
onGridReady={onGridReady}
getLocaleText={getLocaleText}
cacheOverflowSize={10}
rowSelection={rowSelection || 'multiple'}
rowSelection={rowSelection ?? 'multiple'}
rowDragEntireRow
rowDragManaged
onRowDragEnd={(e) => move(getIndex(e.node.data), e.overIndex)}
Expand All @@ -251,6 +251,7 @@ export function CustomAgGridTable({
paginationPageSize={paginationPageSize}
alwaysShowVerticalScroll={alwaysShowVerticalScroll}
stopEditingWhenCellsLoseFocus={stopEditingWhenCellsLoseFocus}
theme="legacy"
{...props}
/>
</Box>
Expand Down

0 comments on commit de2bb88

Please sign in to comment.