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

Modal breaks on scalajs-react 1.4 #78

Open
izzyreal opened this issue Sep 17, 2019 · 2 comments
Open

Modal breaks on scalajs-react 1.4 #78

izzyreal opened this issue Sep 17, 2019 · 2 comments

Comments

@izzyreal
Copy link

izzyreal commented Sep 17, 2019

This tutorial is one of the few and better resources to pick up some scalajs. The modal, however, doesn't work when upgrading to scalajs-react 1.4.

Perhaps the whole project can be updated to latest versions of everything.

@izzyreal
Copy link
Author

izzyreal commented Sep 17, 2019

In Bootstrap.scala you do

jQuery(scope.getDOMNode).modal(js.Dynamic.literal...

Upgrading to scalajs-react 1.4 is breaking because getDOMNode now returns a ComponentDom.Mounted rather than an Element. I've tried doing jQuery(scope.getDOMNode.asElement()), but when opening the modal the console reads

Bootstrap.scala:101 Uncaught TypeError: jsx$2 is not a function
    at Bootstrap.scala:101
    at $c_sjsr_AnonFunction0.apply__O (AnonFunctions.scala:22)

@izzyreal izzyreal changed the title Modal breaks on scalajs 1.4 Modal breaks on scalajs-react 1.4 Sep 17, 2019
@ochrons
Copy link
Owner

ochrons commented Sep 17, 2019

If you can fix it with a PR, that would be great! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants