-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Préavis - Immat. navire ne sont pas toujours reportés dans les PDF de débarquement #3504
Conversation
frontend/src/features/PriorNotification/components/shared/DownloadButton/utils.tsx
Show resolved
Hide resolved
async (nextValues: PriorNotification.LogbookFormData) => { | ||
if (isEqual(nextValues, initialFormValues)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est déjà couvert dans FormikEffect : https://github.com/MTES-MCT/monitor-ui/blob/main/src/formiks/FormikEffect.tsx#L20
Par contre il y a un truc à corriger dans FormikEffect au first render je pense. Il est possible que previousValues
soir d'abord undefined avant que les formik context values soient hydratées.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si on fait ça dans monitor-ui, ça casse la logique actuelle : https://github.com/MTES-MCT/monitor-ui/actions/runs/10306609530/job/28530073749?pr=1310
i.e:
it('Should update and reset the text input value with initial values', () => {
const initialValue = 123
const updatedValue = 1234
mountAndWait(<Template {...commonProps} initialValue={initialValue} updatedValue={updatedValue} />)
outputShouldBe({
myNumberInput: initialValue
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vu qu'il y a ausse des impacts sur Env, je dirais qu'on laisse comme ça pour l'instant.
On peut créer un ticket sur monitor-ui pour discuter du fonctionnement de cet effect
Quality Gate passedIssues Measures |
Linked issues