Product: PowerShell Universal
Version: 4.4.0/5.4.0
Hello internet
I trying to create a simple (at least at first look) page with some elements (projects reports with their statuses)
I thought it will be easy and it was at first try, i have data in csv (i read them sequentially), I display them , make some manipulation (add menu item,add report item, delete ,move , change color of project icon etc), and with UDDynamic refresh it was fine
But it was working fine with few entries , like up to 10 maybe 15 it was usable.
But when i added more data (around 50) it was painfully slow, every action was 2-3 delay.
So i ended up using nested UDElements. Each Report (project) element has child elements (report links) and all visual elements (like UDPaper, UDIcon, UDmenu) are wrapped inside those child elements. All elements share the same variable in ID (like $n_element, $n_paper,$n_icon,$n_menu) etc.
And it works very fast even with 50 or more entries. I can add element to parent element , delete element from parent element and its almost instant.
But there is one issue with added element. when I add new element its showing up. But i cannot make any action related to this new element because the code is not aware of which element ID is pressed.
I hope i described in understandable.
So to the main question . When i press icon (id of the icon shares the same variable as main element) how to read current ID of that component ?