ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
37 stars 4 forks source link

Issue using a List Item in a Tooltip #3552

Open adamdriscoll opened 3 months ago

adamdriscoll commented 3 months ago

Version

4.3.4

Severity

Low

Environment

msi

Steps to Reproduce

Nested list item OnClicks do not work but top level ones do.

New-UDApp -Content {
    New-UDTooltip -Placement bottom -Type light -TooltipContent {
        New-UDTypography -Text "Menu2" -FontWeight 600 -Align center -Style @{ fontSize = 13 }
        New-UDDivider -Orientation horizontal -Variant fullWidth
        New-UDList -Dense -Children {
            New-UDListItem -Icon (New-UDIcon -Icon FolderTree -Size md -Solid) -Label "Test1" -Children {
                New-UDListItem -Nested -Icon (New-UDIcon -Icon UserGroup -Size md -Solid) -Label "Test1.1" -OnClick {
                    Show-rgTestModule
                }
                New-UDListItem -Nested -Icon (New-UDIcon -Icon fingerprint -Size md -Solid) -Label "Test1.2" -OnClick {
                    Show-rgTestModule
                }
                New-UDListItem -Nested -Icon (New-UDIcon -Icon IDBadge -Size md -Solid) -Label "Test1.3" -OnClick {
                    Show-rgTestModule
                }
            }
            New-UDListItem -Icon (New-UDIcon -Icon FolderTree -Size md -Solid) -Label "Test2" -OnClick {
                Show-rgTestModule
            }
            New-UDListItem -Icon (New-UDIcon -Icon business_time -Size md -Solid) -Label "Test3" -OnClick {
                Show-rgTestModule
            }
            New-UDListItem -Icon (New-UDIcon -Icon tools -Size md -Solid) -Label "Test4" -OnClick {
                Show-rgTestModule
            }
            New-UDListItem -Icon (New-UDIcon -Icon IDCard -Size md -Solid) -Label "Test5" -OnClick {
                Show-rgTestModule
            }
        }
    } -content {
        New-UDIcon -Icon AddressCard -Solid -Size lg -Style @{ color = 'rgba(0, 151, 207, 0.6)' }
    } 
 }

Expected behavior

Nested clicks do not work.

Actual behavior

Nested clicks work.

Additional Environment data

No response

Screenshots/Animations

No response

rstolpe commented 2 months ago

Maybe a stupid question but this fix will also be added to psu 5 right?