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

feat(ListKeyManager): Support Signal-based Query #28710

Closed
keatkeat87 opened this issue Mar 11, 2024 · 1 comment · Fixed by #28757
Closed

feat(ListKeyManager): Support Signal-based Query #28710

keatkeat87 opened this issue Mar 11, 2024 · 1 comment · Fixed by #28757
Assignees
Labels
area: cdk/a11y P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@keatkeat87
Copy link

keatkeat87 commented Mar 11, 2024

Feature Description

image

Signal-based query doesn't return QueryList anymore, it only returns readonly Array.
so ListKeyManager should support it.

and another thing
image
we should have a way to watch Signal like previously watching QueryList.

Workaround:
if array will not changes, we can just cast to not readonly

const keyManager = new ListKeyManager(this.items() as FocusableOptionDerective[]);

if we need watch the array, we can access private QueryList from Signal.

const signalNode = this.items[SIGNAL] as { _queryList: QueryList<FocusableOptionDerective> };
const keyManager = new ListKeyManager(signalNode._queryList);

Use Case

No response

@keatkeat87 keatkeat87 added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Mar 11, 2024
@keatkeat87 keatkeat87 changed the title ListKeyManager: constructor should support readonly array ListKeyManager: Support Signal-based Query Mar 12, 2024
@keatkeat87 keatkeat87 changed the title ListKeyManager: Support Signal-based Query feat(ListKeyManager): Support Signal-based Query Mar 12, 2024
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: cdk/a11y and removed feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Mar 18, 2024
@crisbeto crisbeto self-assigned this Mar 21, 2024
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 21, 2024
Updates the `ListKeyManager` to support passing in a signal. Also expands the type to allow readonly arrays.

Fixes angular#28710.
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 21, 2024
Updates the `ListKeyManager` to support passing in a signal. Also expands the type to allow readonly arrays.

Fixes angular#28710.
crisbeto added a commit that referenced this issue Mar 21, 2024
Updates the `ListKeyManager` to support passing in a signal. Also expands the type to allow readonly arrays.

Fixes #28710.
crisbeto added a commit that referenced this issue Mar 21, 2024
Updates the `ListKeyManager` to support passing in a signal. Also expands the type to allow readonly arrays.

Fixes #28710.

(cherry picked from commit da980a8)
@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 Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cdk/a11y P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants