Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[selectedOptions] is not shown at the autocomplete list for mat-selection-list #1836

Closed
2 tasks done
Omcsesz opened this issue Dec 11, 2022 · 6 comments
Closed
2 tasks done
Labels

Comments

@Omcsesz
Copy link

Omcsesz commented Dec 11, 2022

🐞 bug report

Is this a regression?

No, it didn't work previously.

Description

Hello, Team!

I'm using Angular Material version 14.2.7. According to the official documentation (https://v14.material.angular.io/components/list/api#MatSelectionList), the mat-selection-list has a property called selectedOptions, but it is not shown in the autocomplete suggestions (see attached gif). Also, the property selected is not not shown for mat-list-option. Can you please fix this?
demoProject2.zip

Bug Type

What does this bug affect

  • Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

Steps to reproduce the behavior:

  1. Open the demo project I provided in the attached zip file
  2. Run npm install
  3. Open src\app\shared\inputs\checkbox-group\checkbox-group.component.html
  4. Try to add property selectedOptions to mat-selection-list, or selected to mat-list-option

Expected behavior

The property selectedOptions should be in the popup list for mat-selection-list, and the property selected should be in the popup list for mat-list-option.

Logs

Log file gives us deep insight into the behavior and performance of the extension. If the issue is a performance
problem or an error occured, please provide the output of the log file below.

Set Angular Log level to verbose.





Screenshots

AutocompleteForAngularNotWorkingCorrectly

🌍 Your Environment

Angular Version:


Angular CLI: 15.0.2
Node: 18.12.1
Package Manager: npm 9.1.3
OS: win32 x64

Angular: 15.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1500.2
@angular-devkit/build-angular      15.0.2
@angular-devkit/core               15.0.2
@angular-devkit/schematics         15.0.2
@angular/cdk                       14.2.7
@angular/material                  14.2.7
@angular/material-moment-adapter   14.2.7
@schematics/angular                15.0.2
rxjs                               6.6.7
typescript                         4.8.4

Extension Version:

Angular Language Service v15.0.2

VSCode Version:

1.74.0 (user setup)

Operating System:

Windows 10 build19045

Extension options:

"angular.enable-strict-mode-prompt": false
@Omcsesz Omcsesz added the bug label Dec 11, 2022
@Omcsesz Omcsesz changed the title [selectedOptions] is not shown at the autocomplete list for mat-selectionlist [selectedOptions] is not shown at the autocomplete list for mat-selection-list Dec 11, 2022
@atscott
Copy link
Collaborator

atscott commented Dec 12, 2022

The listed properties are neither inputs nor outputs of their components. Closing as working as intended.

@atscott atscott closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
@Omcsesz
Copy link
Author

Omcsesz commented Dec 12, 2022

The listed properties are neither inputs nor outputs of their components. Closing as working as intended.

Should they be inputs or outputs in order to be on the autocomplete list?

@atscott
Copy link
Collaborator

atscott commented Dec 12, 2022

Should they be inputs or outputs in order to be on the autocomplete list?

Yes

@Omcsesz
Copy link
Author

Omcsesz commented Dec 12, 2022

Should they be inputs or outputs in order to be on the autocomplete list?

Yes

Good, because [selected] is actually an input:
image

@atscott
Copy link
Collaborator

atscott commented Dec 12, 2022

Good, because [selected] is actually an input:

Indeed, looks like it is. Your project is not using strictTemplates so the issue is actually that mat-list-option is part of a template that's not type checked because of your project's template type checking configuration. If you cannot update to strictTemplates: true, I would recommend using the extension option to override it:

image

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants