@@ -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, setFieldEdited} = useDatasetEditContext ( ) ;
@@ -98,7 +100,7 @@ export const CellViewingRenderer: React.FC<
98
100
if ( isEdited ) {
99
101
return CELL_COLORS . EDITED ;
100
102
}
101
- if ( isNew ) {
103
+ if ( isNew && ! disableNewRowHighlight ) {
102
104
return CELL_COLORS . NEW ;
103
105
}
104
106
return CELL_COLORS . TRANSPARENT ;
@@ -636,6 +638,7 @@ export interface ControlCellProps {
636
638
isDeleted : boolean ;
637
639
isNew : boolean ;
638
640
hideRemoveForAddedRows ?: boolean ;
641
+ disableNewRowHighlight ?: boolean ;
639
642
}
640
643
641
644
export const ControlCell : React . FC < ControlCellProps > = ( {
@@ -646,6 +649,7 @@ export const ControlCell: React.FC<ControlCellProps> = ({
646
649
isDeleted,
647
650
isNew,
648
651
hideRemoveForAddedRows,
652
+ disableNewRowHighlight = false ,
649
653
} ) => {
650
654
const rowId = params . id as string ;
651
655
const rowIndex = params . row . ___weave ?. index ;
@@ -660,7 +664,9 @@ export const ControlCell: React.FC<ControlCellProps> = ({
660
664
justifyContent : 'center' ,
661
665
height : '100%' ,
662
666
width : '100%' ,
663
- backgroundColor : CELL_COLORS . NEW ,
667
+ backgroundColor : disableNewRowHighlight
668
+ ? CELL_COLORS . TRANSPARENT
669
+ : CELL_COLORS . NEW ,
664
670
} }
665
671
/>
666
672
) ;
@@ -676,7 +682,7 @@ export const ControlCell: React.FC<ControlCellProps> = ({
676
682
width : '100%' ,
677
683
backgroundColor : isDeleted
678
684
? CELL_COLORS . DELETED
679
- : isNew
685
+ : isNew && ! disableNewRowHighlight
680
686
? CELL_COLORS . NEW
681
687
: CELL_COLORS . TRANSPARENT ,
682
688
opacity : isDeleted ? DELETED_CELL_STYLES . opacity : 1 ,
0 commit comments