New-UDButton styling not working within UDGrid (after upgrade to 2.8.3)

After upgrading to 2.8.3 styling properties of UDButton stop working if I am using it inside of UDGrid component.

For the EOL button I am using the following code:

New-UDButton -BackgroundColor '#B22222' -Text "EOL" -OnClick 

But it is not reflected on the UI, please see attached screenshot.
image

Environment:
Windows Server 2016
IIS 10
Powershell 5.1

Please let me know how this can be solved.

Thanks!

This seems like a bug. I think @BoSen29 made some changes to the button so we will have to look into it. Can you file an issue on GitHub?

@shykhovtsov
does the other properties function?

Can you try the -style param instead?

I’ll see if i can replicate this

am using 2.8.3 as well and i dont have this issue at all
win 2019
iis 10.5

Fair point WSL, forgot i upgraded myself to 2.8.3 today. The style on my gridded buttons remained.

Probably a clientside cache problem @shykhovtsov?

thank all for quick response.
I tried to use different browsers and cleared the cache, however the result is same.

But, using -style parameter works, please see the following testing, and code used.

$MyDashboard = New-UDDashboard -Title "Hello, World" -Content {
New-UDButton -Text 'test' -BackgroundColor 'red'
New-UDButton -Text 'test' -Style @{
    'background-color' = '#2e8b57'
}

New-UDGrid -Title "Process Information" -Headers @("Name", "Process Id", "Start Time", "Responding","") -Properties @("Name", "Id", "StartTime", "Responding","T")  -Endpoint {
    @(
        [PSCustomObject]@{ Name = "chrome"; Id = 1223; StartTime = "12:12PM"; Responding = $true; T= New-UDButton -Text 'test' -BackgroundColor 'red'}
        [PSCustomObject]@{ Name = "notepad"; Id = 1223; StartTime = "12:12PM"; Responding = $true; T = New-UDButton -Text 'test' -Style @{
    'background-color' = '#2e8b57'
}}
        [PSCustomObject]@{ Name = "devenv"; Id = 1223; StartTime = "12:12PM"; Responding = $true}
        [PSCustomObject]@{ Name = "code"; Id = 1223; StartTime = "12:12PM"; Responding = $true}
        [PSCustomObject]@{ Name = "calc"; Id = 1223; StartTime = "12:12PM"; Responding = $true}
        [PSCustomObject]@{ Name = "minesweeper"; Id = 1223; StartTime = "12:12PM"; Responding = $true}
    ) | Out-UDGridData
}

}

Start-UDDashboard -Port 1001 -Dashboard $MyDashboard -Force

Do you have idea why it is happening?

Sorry @shykhovtsov
I just realized that this doesn’t work on my side either.


fixes it.

“backgroundcolor” has to be “background-color”, my bad :open_mouth:

@BoSen29, thank you very much!