Ant-design: resetFields does not empty the thumbnails of upload component.

Created on 3 Jul 2017  ·  1Comment  ·  Source: ant-design/ant-design

Version

2.11.2

Environment

any environment

Reproduction link

https://codepen.io/gx761/pen/zzWXVM

Steps to reproduce

Note: a condition is added to display logic of upload button that only when fileList is empty, will the button be displayed.

  1. upload a image.
  2. click on reset to reset the form.
  3. you will see filelist is emptyed, the upload button is displayed, but the thumbails(preview images) are still there.

What is expected?

the thumbnails should have gone after clicking on reset button.

What is actually happening?

you will see filelist is emptyed, the upload button is displayed, but the thumbails(preview images) are still there.

Most helpful comment

see: https://ant.design/components/form/#components-form-demo-validate-other

getFieldDecorator('upload', {
+ valuePropName: 'fileList',
})

>All comments

see: https://ant.design/components/form/#components-form-demo-validate-other

getFieldDecorator('upload', {
+ valuePropName: 'fileList',
})
Was this page helpful?
0 / 5 - 0 ratings