primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.57k stars 4.61k forks source link

Need an update of the samples of the Tree component #13775

Open sebastienchevriaupro opened 1 year ago

sebastienchevriaupro commented 1 year ago

Describe the bug

As it is written in the API doc the type of the selection input should be any The code samples linked to the Selection, Mulitple and Checkbox sections do not mention an any type parameter but TreeNode and TreeNode[] In my project (angular 16.2.6 + primeng 16.4.0) it doesn't compile with a Type mismatch error

Environment

angular 16.2.6 + primeng 16.4.0

Reproducer

No response

Angular version

16.2.6

PrimeNG version

16.4.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

?

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

ashikjs commented 1 year ago

@sebastienchevriaupro can you give us any screenshot or code base for reproduce this case.

sebastienchevriaupro commented 1 year ago

image

sebastienchevriaupro commented 1 year ago

The difference with your samples seems to be in the tsconfig.json file : https://stackblitz.com/edit/t6vruk?file=tsconfig.json

sebastienchevriaupro commented 1 year ago

Perhaps something with the "strict" options

mklinke commented 9 months ago

We still have the same issue with 17.4.0. We found that this setting in tsconfig.json shows the issue when enabled:

{
  "angularCompilerOptions": {
    "strictTemplates": true
  },
  ...
}