Skip to content

[Form] Create new Form component#589

Merged
atomiks merged 5 commits intomui:masterfrom
atomiks:feat/Form3
Sep 11, 2024
Merged

[Form] Create new Form component#589
atomiks merged 5 commits intomui:masterfrom
atomiks:feat/Form3

Conversation

@atomiks
Copy link
Contributor

@atomiks atomiks commented Sep 9, 2024

Closes #219

@atomiks atomiks added the component: form Changes related to the form component. label Sep 9, 2024
@mui-bot
Copy link

mui-bot commented Sep 9, 2024

Netlify deploy preview

https://deploy-preview-589--base-ui.netlify.app/

Generated by 🚫 dangerJS against 728de1c

return (
<form onSubmit={handleSubmit} noValidate>
<FieldRoot invalid={error}>
<FieldRoot invalid={error} name="email">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name and diasbled were moved back onto <Field.Root> for SSR/layout shift reasons with the server-side errors prop and style hooks.

We should always try to avoid using effects to sync up data for this reason, unless it's a popup element (which requires interaction to appear for the most part, or at least until hydration which won't cause layout shift).

Comment on lines +31 to +40
/**
* Whether the field is disabled. Takes precedence over the `disabled` prop of the `Field.Control`
* component.
* @default false
*/
disabled?: boolean;
/**
* The field's name. Takes precedence over the `name` prop of the `Field.Control` component.
*/
name?: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaldudak to avoid changing unrelated components too much, we can do namespace types refactoring in a new PR

atomiks and others added 3 commits September 10, 2024 17:45
Co-authored-by: Michał Dudak <michal.dudak@gmail.com>
Signed-off-by: atomiks <cc.glows@gmail.com>
@atomiks atomiks merged commit 7c198fb into mui:master Sep 11, 2024
@atomiks atomiks deleted the feat/Form3 branch September 11, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: form Changes related to the form component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Form] Implement Form

3 participants