Skip to content
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

[base-ui][FormControl] Export FormControlOwnerState type from FormControl #41286

Closed
michaeldfoley opened this issue Feb 27, 2024 · 0 comments · Fixed by #41287
Closed

[base-ui][FormControl] Export FormControlOwnerState type from FormControl #41286

michaeldfoley opened this issue Feb 27, 2024 · 0 comments · Fixed by #41287
Assignees
Labels
bug 🐛 Something doesn't work component: FormControl The React component package: base-ui Specific to @mui/base

Comments

@michaeldfoley
Copy link
Contributor

michaeldfoley commented Feb 27, 2024

Steps to reproduce

Link to live example: (required)
https://codesandbox.io/p/sandbox/kind-shockley-sxl7d8?file=%2Fsrc%2FDemo.tsx%3A21%2C1

Steps:

  1. Try to import FormControlOwnerState from @mui/base/FormControl or @mui/base

Current behavior

The type is not available to import unless you drill into @mui/base/FormControl/FormControl.types

Expected behavior

The *OwnerState type should be exported from the index file as it is with other components like Button, Input, Select, Modal, etc.

Context

I need to pass a function to slotProps.root to utilize the FormControl state. I would like to type the function parameter (FormControlOwnerState) but it's not being exported from the index file at the moment.

Your environment

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

Search keywords: FormControlOwnerState, FormControl, slotProps

@michaeldfoley michaeldfoley added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 27, 2024
@zannager zannager added package: base-ui Specific to @mui/base component: FormControl The React component labels Feb 27, 2024
@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: FormControl The React component package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants