Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload组件未传递要移除的file对象给Observable<boolean>类型的[nzRemove]回调 #1850

Closed
wlclass opened this issue Jul 20, 2018 · 2 comments
Assignees

Comments

@wlclass
Copy link

wlclass commented Jul 20, 2018

Version

1.1.1

Environment

windows10 , chorme

Reproduction link

https://stackblitz.com/edit/antd-upload-nzremove?file=src%2Fapp%2Fapp.component.ts

Steps to reproduce

打开重现链接,点击upload组件中任一图片的移除按钮

What is expected?

期望在handleRemove方法中能获取到将要移除的file对象,以便发送http请求进行后台数据删除处理,在http返回成功后,才允许将图片从upload的ui上移除。

What is actually happening?

handleRemove无法获取到将要移除的file对象

Other?

@GeorgeHuang13
Copy link

啥时候能修正呢。。。。

hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
@louisljw
Copy link

louisljw commented Jan 15, 2021

传值的时候还是传 file 对象,把返回结果设置成 observable 对象就可以了。
handleRemove = (file: NzUploadFile) => { return new Observable<boolean>((obs) => { // do something obs.next(false); }); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants