gpt4 book ai didi

angular - [items] 值不更新

转载 作者:行者123 更新时间:2023-12-03 22:44:08 25 4
gpt4 key购买 nike

我正在处理一个需要带有搜索字段的选择框的页面,因此我决定使用 ngSelect模块。
我的 HTML:

   <ng-select [items]="mesurePoints"
bindLabel="name"
bindValue="id"
>
</ng-select>
选择列表未链接到 mesurePoints一些变化后的值(value)。

最佳答案

this.mesurePoints = [...this.mesurePoints]

它将更新您的项目 https://github.com/ng-select/ng-select#change-detection

关于angular - <ng-select> [items] 值不更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49798743/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com