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

nz-tree无法勾选异步传回的数据 #4202

Closed
MrCodeFront opened this issue Sep 23, 2019 · 5 comments
Closed

nz-tree无法勾选异步传回的数据 #4202

MrCodeFront opened this issue Sep 23, 2019 · 5 comments
Assignees
Labels
Component: Tree Usage Usage questions (not reommended to open a issue for this)

Comments

@MrCodeFront
Copy link

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-tuctjh

Steps to reproduce

父子组件传值,点击子组件的搜索按钮,模仿异步获取到数据,子组件的数据更新了,指定的勾选数组也有了,但nz-tree无法将数据勾选上

What is expected?

点击搜索按钮后,数据改变的同时应该勾选指定数组的数据

What is actually happening?

点击搜索按钮后,数据改变了,但没有勾选指定数组的数据

Environment Info
ng-zorro-antd 8.3.0
Browser chrome version(77.0.3865.90)

我没使用官方提供的nzSearchValue实现搜索功能,而是使用自定义的搜索功能实现的实时的网络异步请求

@zorro-bot
Copy link

zorro-bot bot commented Sep 23, 2019

Translation of this issue:

nz-tree can not check the asynchronous data returned

Reproduction link

Https://stackblitz.com/edit/ng-zorro-antd-start-tuctjh

Steps to reproduce

Sons components by value, click on the search button subcomponents, to imitate asynchronous data acquisition, data subcomponents updates, check the array has also been specified, but nz-tree can not check on the data

What is expected?

After clicking the Search button, the changed data at the same time should check the data specified array

What is actually happening?

Click on the search button, the data has changed, but did not check the data of the specified array

Environment Info
Ng-zorro-antd 8.3.0
Browser chrome version (77.0.3865.90) ​​

I did not use the official implementation nzSearchValue search function, but the use of real-time network asynchronous self-defined search function implemented request

@YeFei572
Copy link

YeFei572 commented Oct 7, 2019

同样的, 我想问下: 我的树节点数据从后台拉取, 可以正常显示, 但是回显已经选中的节点失败, 发现是异步问题惹的祸,

@simplejason
Copy link
Member

同样的, 我想问下: 我的树节点数据从后台拉取, 可以正常显示, 但是回显已经选中的节点失败, 发现是异步问题惹的祸,

目前 nzCheckedKeys 等属性还不支持双向绑定

@simplejason simplejason added the Usage Usage questions (not reommended to open a issue for this) label Oct 14, 2019
@zorro-bot
Copy link

zorro-bot bot commented Oct 14, 2019

Hello @prefects, we use GitHub issues to trace bugs or discuss plans of Ant Design.
So, please don't ask usage questions here.
You can try to ask questions on Stack Overflow or Segment Fault, then apply tag ng-zorro-antd or ng-zorro to your question.

你好 @prefects,Ant Design Issue 板块是用于 bug 反馈与需求讨论的地方。
勿询问如何使用的问题
你可以试着在 Stack Overflow 或者 Segment Fault 中提问(记得添加 ng-zorro-antdng-zorro 标签)。

@phoenix110
Copy link

参考#4472
在异步后执行下面语句.
this.defaultCheckedKeys = [...this.defaultCheckedKeys];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Tree Usage Usage questions (not reommended to open a issue for this)
Projects
None yet
Development

No branches or pull requests

4 participants