Skip to content

formAction on Button does not support React 19 behaviours #47181

@nprice-flextrade

Description

@nprice-flextrade

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/sandbox/pedantic-germain-nc325h
  2. Click the Native Button - this triggers the expected Alert
  3. Click the MUI Button - this has the same "formAction" as the Native button, but does not trigger the expected alert

Current behavior

The formAction property on a Button is being treated as a string prop.

Expected behavior

The formAction property should support an action using a (formData: FormData): void signature

Context

Use React 19 Form Actions

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: formAction does not support React 19 FormData methods

Metadata

Metadata

Assignees

Labels

scope: buttonChanges related to the button.type: bugIt doesn't behave as expected.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions