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

Select, MultiSelect: Scoped Style not working #17381

Closed
1 of 4 tasks
can-oezkan opened this issue Jan 13, 2025 · 5 comments · Fixed by #17427
Closed
1 of 4 tasks

Select, MultiSelect: Scoped Style not working #17381

can-oezkan opened this issue Jan 13, 2025 · 5 comments · Fixed by #17427
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@can-oezkan
Copy link
Contributor

can-oezkan commented Jan 13, 2025

Describe the bug

Not sure if I'm doing anything wrong. But i can't seem to apply scoped tokens to Select or MultiSelect.

<p-select
  [options]="[1, 2, 3, 4, 5]"
  [dt]="{
    root: {
      background: 'red',
    },
  }"
/>

<p-multiselect
  [options]="[1, 2, 3, 4, 5]"
  [dt]="{
    root: {
      background: 'red',
    },
  }"
/>

image

Pull Request Link

#17427

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/github-umrbpb5u?file=src%2Fapp%2Fapp.component.html

Environment

stackblitz

Angular version

v19

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Use p-select or p-multiselect
  2. apply scoped design tokens
  3. not working (see stackblitz example)

Expected behavior

The scoped style should apply

@can-oezkan can-oezkan added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 13, 2025
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team Component: Theme Issue or pull request is related to Theme and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 16, 2025
@mertsincan mertsincan added this to the 19.1.0 milestone Jan 16, 2025
@mertsincan mertsincan self-assigned this Jan 16, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Jan 16, 2025
@mertsincan mertsincan removed the Component: Theme Issue or pull request is related to Theme label Jan 16, 2025
@can-oezkan
Copy link
Contributor Author

Related Issue: #17403

The creator of the other issue created a PR to fix the bug for select component: #17246

MultiSelect can be fixed similarly. Here super.ngAfterViewInit() should be called instead.

ngAfterViewInit() {
super.ngOnInit();
if (this.overlayVisible) {
this.show();
}
}

@can-oezkan
Copy link
Contributor Author

can-oezkan commented Jan 17, 2025

Added a PR that fixes the MultiSelect: #17427

@mertsincan mertsincan modified the milestones: 19.1.0, 19.0.6 Jan 29, 2025
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Jan 29, 2025
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeNG Jan 29, 2025
@WillooWisp
Copy link

This still does not work using your playground as an example. The properties set through the [dt] binding never gets applied.

@can-oezkan
Copy link
Contributor Author

MultiSelect is fixed by my PR. I have updated my stackblitz to use the latest primeng version:

Image

As for the Select Component, the PR #17246 is still awaiting approval

@can-oezkan
Copy link
Contributor Author

@mertsincan can you approve and merge the PR to fix the Select Component? #17246

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
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants