Skip to content

Commit

Permalink
The change that is not ideal but which works
Browse files Browse the repository at this point in the history
  • Loading branch information
den4ik1203 committed Jun 3, 2024
1 parent 9a10aa7 commit 47be35d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/webapp/src/containers/Task/TaskComplete/StepOne.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ function TaskCompleteStepOne({ history, match, location }) {
}, [dispatch, task_id]);

// Generate a unique key based on products length and a timestamp
const productsKey = `${products.length}-${Date.now()}`;

console.log('Rendering PureCompleteStepOne with key:', JSON.stringify(products));
return (
<HookFormPersistProvider>
<PureCompleteStepOne
key={productsKey} // Using generated key to force re-render on any product change
key={JSON.stringify(products)}
onContinue={onContinue}
onGoBack={onGoBack}
system={system}
Expand Down

0 comments on commit 47be35d

Please sign in to comment.