Priya
Priya

Reputation: 126

How to include filter in mat select nested values using angular

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!!!!

Upvotes: 2

Views: 754

Answers (1)

Vivek Jain
Vivek Jain

Reputation: 2864

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

Upvotes: 1

Related Questions