Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

UDSideNavItem -OnClick not working #853

Closed
gitbute opened this issue Jun 3, 2019 · 0 comments
Closed

UDSideNavItem -OnClick not working #853

gitbute opened this issue Jun 3, 2019 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@gitbute
Copy link

gitbute commented Jun 3, 2019

Hey

The UDSideNavItem with the OnClick parameter doesnt work correctly. It just does nothing when clicked.
Example to try and reproduce:

$Page1 = New-UDPage -Name "Page Name" -Content { New-UDCard -Id 'page-1' }
$Page2 = New-UDPage -Name "Page Name 2" -Content { New-UDCard -Id 'page-2' }

$Navigation = New-UDSideNav -Endpoint {
    New-UDSideNavItem -Text "My First Page" -OnClick { Show-UDModal -Content { New-UDCard -Id "ModalCard" } } -Icon group
} -Fixed

$db = New-UDDashboard -Title "Navigation" -Pages @($Page1, $Page2) -Navigation $Navigation
Start-UDDashboard -Dashboard $db -Port 12312

Theres an error in the chrome JS console:

react-dom.production.min.js:21 Uncaught ReferenceError: item is not defined
at t.value (ud-navigation.jsx:122)
at Object. (react-dom.production.min.js:14)
at f (react-dom.production.min.js:15)
at react-dom.production.min.js:15
at x (react-dom.production.min.js:17)
at S (react-dom.production.min.js:18)
at T (react-dom.production.min.js:18)
at A (react-dom.production.min.js:21)
at Mn (react-dom.production.min.js:84)
at As (react-dom.production.min.js:250)

@adamdriscoll adamdriscoll added the bug Something isn't working label Jun 3, 2019
@adamdriscoll adamdriscoll added this to the 2.4.2 milestone Jun 3, 2019
adamdriscoll added a commit that referenced this issue Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants