# Refresh selectionData property on Tree component without clicking tree

**URL:** <https://forum.inductiveautomation.com/t/refresh-selectiondata-property-on-tree-component-without-clicking-tree/104678>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 3, 2025, 8:28pm UTC](https://forum.inductiveautomation.com/t/refresh-selectiondata-property-on-tree-component-without-clicking-tree/104678 "2025-04-03T20:28:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noah\_Gilgo](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@Noah\_Gilgo](https://forum.inductiveautomation.com/u/Noah_Gilgo)\
**Post date:** [April 3, 2025, 8:28pm UTC](https://forum.inductiveautomation.com/t/refresh-selectiondata-property-on-tree-component-without-clicking-tree/104678/1 "2025-04-03T20:28:45Z")

</div>

I have a tree component. The `items` property of the tree can be periodically updated by actions on the screen that the user can take.

The `selectionData` property on the tree contains the data of the currently selected element. However, this property only refreshes its values when the user clicks on the item within the tree, not when the tree's data stored within the `items` property changes.

How can I configure `selectionData` to refresh itself by any means other than manually clicking the tree? I've tried quickly changing the selection paths on the tree via the scrip below, but this was ineffective:

```python
current_selection_path = str(self.getChild("Tree").props.selection[0])
self.getChild("Tree").props.selection[0] = '0'
self.getChild("Tree").props.selectionData[0].itemPath = '0'
self.getChild("Tree").props.selection[0] = current_selection_path
self.getChild("Tree").props.selectionData[0].itemPath = current_selection_path

```
