docs: Update upload faq

This commit is contained in:
zombiej 2021-03-09 14:22:03 +08:00
parent c7e751c0f9
commit 1c461ecab4
2 changed files with 8 additions and 0 deletions

View File

@ -104,3 +104,7 @@ Please set property `url` of each item in `fileList` to control content of link.
### How to use `customRequest`?
See <https://github.com/react-component/upload#customrequest>.
### Why `fileList` in control will not trigger `onChange` `status` update when file not in the list?
`onChange` only trigger when file in the list, it will ignore left events when removed from the list. Please note that there exist bug which makes event still trigger even the file is not in the list before `4.13.0`.

View File

@ -104,3 +104,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/QaeBt_ZMg/Upload.svg
### `customRequest` 怎么使用?
请参考 <https://github.com/react-component/upload#customrequest>
### 为何 `fileList` 受控时,上传不在列表中的文件不会触发 `onChange` 后续的 `status` 更新事件?
`onChange` 事件仅会作用于在列表中的文件,因而 `fileList` 不存在对应文件时后续事件会被忽略。请注意,在 `4.13.0` 版本之前受控状态存在 bug 导致不在列表中的文件也会触发。