Skip to content

Commit

Permalink
Revert "feat: support name prop (react-component#574)"
Browse files Browse the repository at this point in the history
This reverts commit d94d644.
  • Loading branch information
Wxh16144 committed Aug 30, 2024
1 parent d3cdcb0 commit c1ceb94
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions src/AjaxUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ class AjaxUploader extends Component<UploadProps> {
classNames = {},
disabled,
id,
name,
style,
styles = {},
multiple,
Expand Down Expand Up @@ -308,7 +307,6 @@ class AjaxUploader extends Component<UploadProps> {
<input
{...pickAttrs(otherProps, { aria: true, data: true })}
id={id}
name={name}
disabled={disabled}
type="file"
ref={this.saveFileInput}
Expand Down
1 change: 1 addition & 0 deletions src/Upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Upload extends Component<UploadProps> {
prefixCls: 'rc-upload',
data: {},
headers: {},
name: 'file',
multipart: false,
onStart: empty,
onError: empty,
Expand Down
6 changes: 0 additions & 6 deletions tests/uploader.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ describe('uploader', () => {
expect(container.querySelector('input')!.id).toBe('bamboo');
});

// https://github.com/ant-design/ant-design/issues/50643
it('with name', () => {
const { container } = render(<Upload name="bamboo" />);
expect(container.querySelector('input')!.name).toBe('bamboo');
});

it('should pass through data & aria attributes', () => {
const { container } = render(
<Upload
Expand Down

0 comments on commit c1ceb94

Please sign in to comment.