Skip to content

Commit bd437bf

Browse files
authored
Merge pull request #7619 from marmelab/fix-file-input
Fix FileInput name And id Props
2 parents a6dd50c + 6701c45 commit bd437bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/ra-ui-materialui/src/input/FileInput.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export const FileInput = (props: FileInputProps) => {
149149

150150
return (
151151
<StyledLabeled
152-
id={id}
152+
htmlFor={id}
153153
label={label}
154154
className={clsx('ra-input', `ra-input-${source}`, className)}
155155
source={source}
@@ -166,6 +166,7 @@ export const FileInput = (props: FileInputProps) => {
166166
>
167167
<input
168168
id={id}
169+
name={id}
169170
{...getInputProps({
170171
...inputPropsOptions,
171172
})}

0 commit comments

Comments
 (0)