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

Multiselect: headerCheckboxViewChild not found #14737

Closed
MaksymPlotnikov opened this issue Feb 6, 2024 · 1 comment · Fixed by #14766
Closed

Multiselect: headerCheckboxViewChild not found #14737

MaksymPlotnikov opened this issue Feb 6, 2024 · 1 comment · Fixed by #14766
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@MaksymPlotnikov
Copy link

MaksymPlotnikov commented Feb 6, 2024

Describe the bug

image

ViewChild input headerCheckboxViewChild with appendTo="body" and custom filterTemplate cannot be found since overlay is not a view child.
Possible solution:
Please add optional chaining inside onToggleAll method since nativeElement of undefined.

DomHandler.focus(this.headerCheckboxViewChild?.nativeElement);

And provide a possibility to pass this custom template checkbox as a headerCheckboxViewChild to component

Environment

PrimeNG 17.5.0

Reproducer

No response

Angular version

17.1.1

PrimeNG version

17.5.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Add appendTo="body" attribute for multi-select and add with custom filterTemplate
  2. Click on 'Select all' checkbox in the panel header.

Demo:
https://stackblitz.com/edit/8cwxx3

Expected behavior

No errors in console

@MaksymPlotnikov MaksymPlotnikov added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 6, 2024
@MaksymPlotnikov MaksymPlotnikov changed the title Multiselect: headerCheckboxViewChild for appendTo="body" Multiselect: headerCheckboxViewChild not found Feb 6, 2024
@VolodymyrKornetskyi
Copy link

The same issue...

@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 8, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.7.0 milestone Feb 8, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Feb 8, 2024
cetincakiroglu added a commit that referenced this issue Feb 13, 2024
Fixed #14737 - Multiselect | headerCheckboxViewChild not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants