How to include filter in mat select nested values using angular

被刻印的时光 ゝ 提交于 2020-08-09 16:11:09

问题


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

I'm facing two issues.

  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.

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

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

Anyone help will be appreciated!!!!


回答1:


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

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



来源:https://stackoverflow.com/questions/63172621/how-to-include-filter-in-mat-select-nested-values-using-angular

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