At the moment the New-UDInputAction does as it is supposed to do and replace the input dialog with the results
What I want to have happen is that input dialog stays and the results are outputted to a grid or table below.
Is that do-able?
In that case, ditch your New-UDInputAction -Content since this is specifically to replace the content of the form by the output from the content scriptblock.
Instead, you could create an empty named div through New-UDElement that would create the UDTable based on the results of the form, which you need to store in a $Session or $Cache variable.
Based on whether or not files were found, the Table / grid might be created.
The magic cmdlet is Sync-UDElement in your UDInput endpoint to trigger a refresh of your UDElement.
See the sample below.
(I used $Cache in my example rather than $Session due to the latter being broken currently but in a multi-user scenario, you would want to store the results in a session variable instead)
In the marketplace (https://marketplace.universaldashboard.io/) there’s an ‘Active Directory’ Dashboard, one of the pages is called ‘Search’ which takes input, and puts it to a grid.
Do you guys knows if there is a limitation of “New-UDElement” you can add to a page ? I tried to the the exact same as @itfranck but with 2 UDElements that I want to show up one after the other. As soon as I click on the UDInput, the dashboard simply crashed, If I remove the second UDElement it works back again. What I’m trying to achieve is having a two Inputs that lead to a chart and the first will drive second’s UDInput’s content and both UDInput content will be used to construct the chart. Have you ever experience this kind of behavior ?
Edit: I nested the Second New-UDElement in the first one, then did a @(“Elem1”,“Elem2”) | Sync-UDElement and it worked out.