如何在滤镜中包括使用角选择嵌套值的过滤器 [英] How to include filter in mat select nested values using angular

查看:46
本文介绍了如何在滤镜中包括使用角选择嵌套值的过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有嵌套下拉列表的有角材质.下拉值以父级和子级为基础嵌套.

I'm using angular material with nested dropdowns. The dropdown values nested with parent and child basis.

我面临两个问题.

  1. 自动建议不起作用.如果输入父名称或其关联的子名称,则必须使用展开模式进行过滤并显示特定的父视图.

  1. Auto suggestion is not working. If I type parent name or its associated child name, have to filter and show the particular parent view with expand mode.

如果我扩展第一个父级并尝试扩展第二个父级,则在扩展第二个父级时,第一个父级视图应自动关闭.

If i expand first parent and trying to expand the second parent, the first parent view should close automatically while expanding the second one.

请找到stackblitz链接 https://stackblitz.com/edit/angular-f5mizr-我正在使用9fpccz 进行采样.

Please find the stackblitz link https://stackblitz.com/edit/angular-f5mizr-9fpccz which i am using to do the sample.

任何人的帮助都会感激!!!

推荐答案

对于您的第一个要求mat-select不起作用.您必须使用mat-autocomplete.

For your 1st requirement mat-select won't work. You have to use mat-autocomplete.

请在此处找到我的解决方案: https://stackblitz.com/edit/angular -f5mizr-final-flcevo

Please find my solution here: https://stackblitz.com/edit/angular-f5mizr-final-flcevo

这篇关于如何在滤镜中包括使用角选择嵌套值的过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆