Checkbox: breaking change for value type #13182
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
As part of the commit 619c52b that added types to various
Checkbox
properties, there was a breaking change where the type ofvalue
property changed fromany
tostring | object | boolean | undefined | null
.I'm working on upgrading our app to Angular 16 and, because of that, I need to upgrade PrimeNg to 16 as well (OT: I wonder when the non-RC version will arrive). In our app, we have a lot of checkboxes that are based on
enum
, and thevalue
we're assigning to thevalue
is of thatenum
type. Ourenum
has values that are of typenumber
which is not one of the allowed types for thevalue
property. Prior to this change, everything worked correctly while now we can't compile the app without casting the enum value toany
.Environment
Angular 16.0.4 with PrimeNg 16.0.0-rc.2 and TypeScript 5.0.4
Reproducer
No response
Angular version
16.0.4
PrimeNG version
16.0.0-rc.2
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.16.0
Browser(s)
No response
Steps to reproduce the behavior
value
set to one of the enum values and one checkbox withnumber
value. For example:Expected behavior
Checkbox control should work with both enum and
number
valuesThe text was updated successfully, but these errors were encountered: