Show-UDModal Sizing?

Is there any way currently to change the default width of a modal?

thanks,

There currently isn’t a way to do this. Please open an issue on GitHub if it’s something you would like to see.

Thanks again @adam, #720 has been opened.

1 Like

I have a New-UDTable inside a Show-UDModal. There multiple entries in the data but only the first row displays in the table in the Modal window. Limitation of Show-UDModal or am I doing something wrong?

New-UDButton -Text "+" -OnClick (
	New-UDEndpoint -Endpoint {
		Show-UDModal -Content {
			$ServerColumns = @("Hostname", "DateAdded", "DateUpdated", "LastCheck")
			$ServerHeaders = @("Hostname", "Added", "Updated", "Last Check")
			New-UDTable -Title "Servers" -Headers $ServerHeaders -Content {
				$ArgumentList[0] | Out-UDTableData -Property $ServerColumns
			}
		}
	} -ArgumentList $_.ServerDetails
)

It shouldn’t be an issue with the modal. Try removing the indexer.

New-UDButton -Text "+" -OnClick (
	New-UDEndpoint -Endpoint {
		Show-UDModal -Content {
			$ServerColumns = @("Hostname", "DateAdded", "DateUpdated", "LastCheck")
			$ServerHeaders = @("Hostname", "Added", "Updated", "Last Check")
			New-UDTable -Title "Servers" -Headers $ServerHeaders -Content {
				$ArgumentList | Out-UDTableData -Property $ServerColumns
			}
		}
	} -ArgumentList $_.ServerDetails
)

removing the indexer on $ArgumentList did the trick. Thanks!

1 Like