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

Table: Untyped value input #17761

Open
jase88 opened this issue Feb 24, 2025 · 0 comments
Open

Table: Untyped value input #17761

jase88 opened this issue Feb 24, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@jase88
Copy link
Contributor

jase88 commented Feb 24, 2025

Describe the bug

Currently the input value has the type any. Related events are also typed with any.

So it is possible to wrongly type event handlers and PrimeNGs Table Api is not supportive.

As user I would like to have a more typed value, because it makes the code more predictable and reduces runtime errors. It helps catch errors at compile time, making the code easier to maintain.

Pull Request Link

No response

Reproducer

https://tdjup3md.stackblitz.io

Environment

MacOS

Angular version

19.1.7

PrimeNG version

v19

Node version

22.13.0

Browser(s)

Chrome

Steps to reproduce the behavior

See Stackblitz example

  1. Use a value input of type Product[]
  2. Add a event listener like selectionChange which expects a different type like Bar

Expected behavior

A type error occurs if the types are incompatible

@jase88 jase88 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 24, 2025
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

1 participant