Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDJSLoader is not defined #495

Closed
mkellerman opened this issue Nov 20, 2018 · 3 comments
Closed

UDJSLoader is not defined #495

mkellerman opened this issue Nov 20, 2018 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@mkellerman
Copy link

Upgraded my project to v2.2.0-beta1, and UDJSLoader stopped working.

image

@adamdriscoll adamdriscoll added the bug Something isn't working label Nov 23, 2018
adamdriscoll added a commit that referenced this issue Dec 6, 2018
@adamdriscoll
Copy link
Member

I removed the need for this. You can update your New-UDDropdown function like this:

function New-UDDropdown {
            param(
                [Parameter()]
                [string]$Id,
                [Parameter()]
                [string]$Text,
                [Parameter()]
                [ScriptBlock]$Content
            )
        
            New-UDElement -Tag "a" -Id "btn$id" -Attributes @{ className = "dropdown-button btn"; href = "#"; "data-activates" = $Id} -Content { $Text }
            New-UDElement -Tag "ul" -Id $id -Attributes @{ className = "dropdown-content"} -Content {
                $Content.Invoke()
            }

            New-UDElement -Tag 'div' -OnMount "`$('.dropdown-button').dropdown({constrainWidth: false})" -Content {} -Attributes @{ display = "none"} 
        }

UDJSLoader has been replaced with the New-UDElement -OnMount parameter that lets you run any JS you want after the component has mounted.

adamdriscoll added a commit that referenced this issue Dec 6, 2018
@adamdriscoll adamdriscoll added this to the 2.2.0 milestone Dec 10, 2018
@mkellerman
Copy link
Author

mkellerman commented Dec 10, 2018 via email

@mkellerman
Copy link
Author

mkellerman commented Dec 10, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants