Skip to content

Fix: prevent double POST submission in shadcn ActionButtons

yahya.elmokhtari a demandé de fusionner fix-double-post-action-buttons vers develop

Summary

  • Add type="button" to all buttons in action-buttons.tsx
  • shadcn <Button> defaults to type="submit", causing double POST when rendered inside a <form> — the onClick handler fires formik.submitForm() AND the native form onSubmit triggers formik.handleSubmit

Affected

All forms using shadcn ActionButtons inside a <form> wrapper (Marque/Modèle, Fiche Véhicule, event details, etc.)

Rapports de requête de fusion