@@ -116,15 +116,11 @@ export const GenericTable = ({
116116
117117 // Store last parameter in a ref
118118 // Update a state is async, so, in case of multiple call of updateParameterValue in same function
119- // parameter state value will be updated only in last call.
119+ // parameter state value will be update only in last call.
120120 // We need here to use a ref value for be sure to have the good value.
121121 const lastNewParameterValue = useRef ( parameter ) ;
122- const dirtyState = useRef ( false ) ;
123-
124122 const updateParameterValue = useCallback (
125123 ( newValuePart , shouldReset = false ) => {
126- const lastIsDirty = dirtyState . current ;
127- dirtyState . current = isDirty ;
128124 const newParameterValue = {
129125 ...lastNewParameterValue . current ,
130126 ...newValuePart ,
@@ -142,14 +138,14 @@ export const GenericTable = ({
142138 // Prevent useless update of parameterValue if multiple updateParameterValue was done before
143139 if ( lastNewParameterValue . current === newParameterValue ) {
144140 if ( shouldReset ) {
145- resetParameterValue ( newParameterValue , lastIsDirty === isDirty ) ;
141+ resetParameterValue ( newParameterValue ) ;
146142 } else {
147143 setParameterValue ( newParameterValue ) ;
148144 }
149145 }
150146 } ) ;
151147 } ,
152- [ resetParameterValue , setParameterValue , isDirty ]
148+ [ resetParameterValue , setParameterValue ]
153149 ) ;
154150
155151 const updateParameterValueWithReset = ( newValuePart ) => {
@@ -443,12 +439,9 @@ export const GenericTable = ({
443439 const onCellChange = updateOnFirstEdition ;
444440
445441 const onClearErrors = ( ) => {
446- updateParameterValue (
447- {
448- errors : null ,
449- } ,
450- true
451- ) ;
442+ updateParameterValue ( {
443+ errors : null ,
444+ } ) ;
452445 } ;
453446
454447 const buildErrorsPanelTitle = ( errorsCount , maxErrorsCount ) => {
0 commit comments