components icon indicating copy to clipboard operation
components copied to clipboard

bug(COMPONENT): Mat-Autocomplete filter should work in mat-dialog

Open Bradrajkumar opened this issue 4 years ago • 2 comments

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

i am beginner in angular development and trying to understand the use case feasibility as per my client requirement. requirement is described as :- angular material autocomplete filtration is not working while using it inside angular dialog. this dialog is having formgroup with few formcontrols in it.

i want a quick reply on this as it is effecting/blocking my further development.

Reproduction

Steps to reproduce:

  1. create a component where CRUD operation on material table can be performed. (Created)
  2. populate the table. (populated through api)
  3. create one button to open dialog. (insert operation to be performed where onclick of button dialog popup will appear)
  4. inside dialog popup component there is a formcontrol inside formgroup and in .html file having field as autocomplete. (created)
  5. render dropdown list as autocomplete in dialog ( list of data to be available in dropdown of autocomplete).
  6. documentation to check how filter work while typing in autocomplete field. (read the documentation)
  7. trying to implement the same in dialog popup but filtration is not working. here is the actual problem

Note:- in dialog popup i am using reactive form. i don't have any development environment created to show these steps.

Expected Behavior

autocomplete filteration should work on dialog popup but autocomplete is using property as [formControl] to bind the data and reactive form use property as formControlName. (This can be root cause)

Actual Behavior

using formControlName, autocomplete filtration is not working. tried to import FormsModule if in case it is have property as [formControl]

Environment

  • Angular: 12.2.13
  • CDK/Material:12.2.13
  • Browser(s):chrome
  • Operating System (e.g. Windows, macOS, Ubuntu):windows

Bradrajkumar avatar Jan 18 '22 10:01 Bradrajkumar

Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc.

crisbeto avatar Jan 18 '22 22:01 crisbeto

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.