Searching Data From Different Component in Angular NGXS

帅比萌擦擦* 提交于 2019-12-02 01:22:25

Having a look at your StackBlitz, it seems you are trying to filter a list based on what is entered in the peopleForm input element.

Rather than tryring to select from the store when this value changes in the component, I've found a good way to model this problem is to store the 'search text' in the state, and use a @Selector that applies the current search value to the list returns those items that meet the criteria.

Take a look at this answer where I've outlined this approach.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!