@@ -44,6 +44,7 @@ interface CellViewingRendererProps {
44
44
isNew ?: boolean ;
45
45
isEditing ?: boolean ;
46
46
serverValue ?: any ;
47
+ disableNewRowHighlight ?: boolean ;
47
48
}
48
49
49
50
export const CellViewingRenderer : React . FC <
@@ -58,6 +59,7 @@ export const CellViewingRenderer: React.FC<
58
59
id,
59
60
field,
60
61
serverValue,
62
+ disableNewRowHighlight = false ,
61
63
} ) => {
62
64
const [ isHovered , setIsHovered ] = useState ( false ) ;
63
65
const { setEditedRows, setAddedRows} = useDatasetEditContext ( ) ;
@@ -94,7 +96,7 @@ export const CellViewingRenderer: React.FC<
94
96
if ( isEdited ) {
95
97
return CELL_COLORS . EDITED ;
96
98
}
97
- if ( isNew ) {
99
+ if ( isNew && ! disableNewRowHighlight ) {
98
100
return CELL_COLORS . NEW ;
99
101
}
100
102
return CELL_COLORS . TRANSPARENT ;
@@ -597,6 +599,7 @@ export interface ControlCellProps {
597
599
isDeleted : boolean ;
598
600
isNew : boolean ;
599
601
hideRemoveForAddedRows ?: boolean ;
602
+ disableNewRowHighlight ?: boolean ;
600
603
}
601
604
602
605
export const ControlCell : React . FC < ControlCellProps > = ( {
@@ -607,6 +610,7 @@ export const ControlCell: React.FC<ControlCellProps> = ({
607
610
isDeleted,
608
611
isNew,
609
612
hideRemoveForAddedRows,
613
+ disableNewRowHighlight = false ,
610
614
} ) => {
611
615
const rowId = params . id as string ;
612
616
const rowIndex = params . row . ___weave ?. index ;
@@ -621,7 +625,9 @@ export const ControlCell: React.FC<ControlCellProps> = ({
621
625
justifyContent : 'center' ,
622
626
height : '100%' ,
623
627
width : '100%' ,
624
- backgroundColor : CELL_COLORS . NEW ,
628
+ backgroundColor : disableNewRowHighlight
629
+ ? CELL_COLORS . TRANSPARENT
630
+ : CELL_COLORS . NEW ,
625
631
} }
626
632
/>
627
633
) ;
@@ -637,7 +643,7 @@ export const ControlCell: React.FC<ControlCellProps> = ({
637
643
width : '100%' ,
638
644
backgroundColor : isDeleted
639
645
? CELL_COLORS . DELETED
640
- : isNew
646
+ : isNew && ! disableNewRowHighlight
641
647
? CELL_COLORS . NEW
642
648
: CELL_COLORS . TRANSPARENT ,
643
649
opacity : isDeleted ? DELETED_CELL_STYLES . opacity : 1 ,
0 commit comments