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

P-dropdown validation not working with class objects #13779

Closed
Anirudh16 opened this issue Sep 29, 2023 · 1 comment
Closed

P-dropdown validation not working with class objects #13779

Anirudh16 opened this issue Sep 29, 2023 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@Anirudh16
Copy link

Anirudh16 commented Sep 29, 2023

Describe the bug

P-dropdown showing as valid when a class with objects are used for ngModel instead of interface like below.

export class City {
public name: string = "";
public code: string = "";
}

Environment

Primeng: 17.13.0
Angular 17.3.1

Reproducer

https://codesandbox.io/s/primeng-dropdown-basic-demo-forked-vpq54r?file=/src/app/demo/dropdown-basic-demo.ts

Angular version

17.3.1

PrimeNG version

17.13.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.16

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to https://codesandbox.io/s/primeng-dropdown-basic-demo-forked-vpq54r?file=/src/app/demo/dropdown-basic-demo.ts
  2. Added two dropdowns with first dropdown as null and second dropdown as class instance
  3. When dropdown is opened and closed without any selection it should provide validation message
  4. For first dropdown it would throw validation but for second dropdown it would not throw any message

Expected behavior

No response

@Anirudh16 Anirudh16 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 29, 2023
@mehmetcetin01140
Copy link
Contributor

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants