primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Component: tree checked/selected not working, only partialSelected works

Open anndyd opened this issue 2 years ago • 0 comments

Describe the bug

html: <p-tree [value]="permissions" selectionMode="checkbox" [selection]="selectedpermissions" class="w-full md:w-30rem" >

permissions = [ { children: [ {key: '7child', label: 'tenantOverview', data: 7}], key: "0", label: "首页" { key: "1", label: "商品", selected: true, checked: true, data: 13 }, ];

but after page loaded, all checkbox uncheck.

Environment

mac os 14.0 (23A344)

Reproducer

No response

Angular version

17.0.5

PrimeNG version

17.3.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v20.10.0

Browser(s)

edge 124.0.2478.51,

Steps to reproduce the behavior

  1. add tree component to html, and configuring selectionMode as checkbox.
  2. prepare data and set some node checked/selected as true,
  3. run project: ng s
  4. check in browser

Expected behavior

some tree nodes check box checked as data set

anndyd avatar Apr 26 '24 03:04 anndyd