Select value prop #41302
Labels
component: select
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
typescript
Steps to reproduce
Link to live example: (required)
Steps:
const [category, setCategory] = useState<string | number>("");
<Select value={category} disableUnderline onChange={(e) => { setCategory(e.target.value ?? 0); }} > -- map your MenuItems here with values being numerical </Select>
Current behavior
Even though the documentation says it is type of '' | any, it does not work
Expected behavior
No response
Context
No response
Your environment
npx @mui/envinfo
Search keywords: select value prop
The text was updated successfully, but these errors were encountered: