question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Checked parent - unchecked child doesn't behave correctly for decoupleChildFromParent = true

See original GitHub issue

data structure:

itCategory = [new TreeviewItem({
    text: 'IT', value: 9, checked: true, children: [
      {
        text: 'Programming', value: 91, children: [], checked: false
      }
    ]
  })];

config:

    this.ngxTreeviewConfig = {
      hasAllCheckBox: false,
      hasFilter: false,
      hasCollapseExpand: true,
      decoupleChildFromParent: true,
      maxHeight: 600
    };

view:

<ngx-treeview [config]="ngxTreeviewConfig" [items]="itCategory" (selectedChange)="onSelectedChange($event)"></ngx-treeview>

results in: screen shot 2017-12-13 at 17 28 12

should result in: screen shot 2017-12-13 at 17 30 00

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
leovo2708commented, Jun 1, 2018

Yes, when using decoupleChildFromParent =true, any changes from parent will not reflect to children. Please change decoupleChildFromParent =false

1reaction
jenkyjenicommented, Jun 1, 2018

In my case, i need to check the parent by default when there is not child selected

Read more comments on GitHub >

github_iconTop Results From Across the Web

Checked parent - Bountysource
Checked parent - unchecked child doesn't behave correctly for decoupleChildFromParent = true.
Read more >
javascript - How can I "check/uncheck" nodes "child/parent ...
I found the answer for my question in own jstree site: link. two_state A boolean. Default is false. If set to true checkboxes...
Read more >
Google | Onsite | Front end | Nested Checkbox - LeetCode
If the parent checkbox is unchecked, then all the children checkboxes are unchecked. If some of the children checkboxes are checked, then the...
Read more >
Temper Tantrums (for Parents) - Nemours KidsHealth
Temper tantrums range from whining and crying to screaming, kicking, hitting, and breath holding. Get the facts on managing - and preventing -...
Read more >
Discipline vs Punishment: The Difference In Child Development
Find out the difference between discipline and punishment, and the best strategies to parent your child without yelling or punishing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found