【发布时间】:2022-11-01 17:31:38
【问题描述】:
<form onSubmit={handleSubmit(onSubmit)}>
<Box marginTop={2}>
{textFields.map((textField) => (
<TextField
sx={{
my: 2,
}}
fullWidth
label={textField.label}
placeholder={textField.placeholder}
name={textField.name}
inputRef={register}
key={textField.label}
/>
))}
</Box>
<Button type='submit' size='large' variant='contained' fullWidth>
Submit
</Button>
</form>
在 React 中使用 MUI 开发表单时,我得到了一个 Getting Uncaught TypeError: path.split is not a function。
尝试在互联网上搜索解决方案,但我并没有完全了解 MUI 部分需要做什么。
【问题讨论】:
标签: reactjs forms material-ui