Custom Widgets Questions

Product: PowerShell Universal
Version: 5.5.0

If I do a custom widget that pulls some info from other places in PSU and then have a button that is supposed to take you to a new page, based on either properties input or the data row, you are on, I see some things I’m not sure about.

Is $Navigation.NavigateTo("/url") the correct command to use for the click event? I use that and I get a url change in the browser but the page doesn’t change. However, if I use $Navigation.NavigateTo("/url", $true) (which is the overload for forcing from the server-side) it seems to work.

In looking at Blazor docs, I see no built-in way to open things in a new tab (middle click) without using javascript. However, there seem to be many instances in PSU where it is possible. How is this accomplished with widget buttons/links?

Lastly, anymore documentation/examples for widgets? The current documentation is fine for giving “definittions”, but doesn’t seem to really connect all the pieces for me.

Thanks in advance.

I’m not sure there is currently way to get middle click to work. As for examples and documentation, I’ll admit, that is very lacking. We do have some examples here:gallery/Widgets at main · ironmansoftware/gallery · GitHub

I’d argue they don’t suffice and we need to improve this.

@adam Thanks, I’ve been going through the widget examples in the gallery, and I’ve typically found enough to get to where I want, or close enough I can figure out the rest. However, I will say that it typically takes me a while because I have to jump around between different examples to find bits and pieces to combine that are more than just bare minimum. Are you willing to post the code, as generic examples in the documentation, for the four widgets that are built-in?