# Perspective Tree Control Selected Data Issue

**URL:** <https://forum.inductiveautomation.com/t/perspective-tree-control-selected-data-issue/99946>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 17, 2024, 5:57pm UTC](https://forum.inductiveautomation.com/t/perspective-tree-control-selected-data-issue/99946 "2024-12-17T17:57:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shane\_Peters](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Shane\_Peters](https://forum.inductiveautomation.com/u/Shane_Peters)\
**Post date:** [December 17, 2024, 5:57pm UTC](https://forum.inductiveautomation.com/t/perspective-tree-control-selected-data-issue/99946/1 "2024-12-17T17:57:18Z")

</div>

Using the Tree control in perspective, is it possible to make a selection via scripting? The problem I'm having is that I have a default value that modifies the props.selection property. The graphic itself updates, however the selectionData property doesn't change. It will only change on a click event. Is it possible force it to update?

# After a click

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d86635249f8020ba9295b3c5ef868784b66e5813.png)

# Changing the selection property manually

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/5/65c98d340514546d54d291dcd6cfce991cb6359b.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 17, 2024, 6:38pm UTC](https://forum.inductiveautomation.com/t/perspective-tree-control-selected-data-issue/99946/2 "2024-12-17T18:38:59Z")

</div>

No. You can make it **clear** by setting selection to an empty list, but it only ever populates by user action. ☹

---

<div class="post-metadata">

**Author:** ![Juniper\_Barlett](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@Juniper\_Barlett](https://forum.inductiveautomation.com/u/Juniper_Barlett)\
**Post date:** [March 27, 2025, 2:58pm UTC](https://forum.inductiveautomation.com/t/perspective-tree-control-selected-data-issue/99946/3 "2025-03-27T14:58:52Z")

</div>

I have a similar issue. When I update the underlying data `TreeView.props.items` (e.g. removing a node), the `TreeView.props.selectionData` persists.

Is there plans to add a function to `updateSelectionData`?
