52 questions
6
votes
1
answer
275
views
Binding.scala - how to get updating count from Vars
I have a Vars binding statement, like so
val data: Vars[Contact] = Vars.empty[Contact]
I'm trying to show the number of elements like so:
<div>{data.all.bind.size}</div>
But this ...
1
vote
0
answers
85
views
Binding.scala - SBT Out Of Memory issues
I have a large @html function (125 lines) and after that sbt fails with OutOfMemory. I increased sbt's memory to 8g and same thing so it's not just it needed a little more memory.
Is this a known ...
1
vote
0
answers
78
views
Reactive components in binding.scala + scalatags
I want to do similar to scalajs-bootstrap for my own css. But as per my knowledge it doesn't perform partial dom update like Binding.scala does. I know we can use Binding.scala and scalatags together ...
1
vote
0
answers
51
views
Binding.scala: Vars.bind seems to not work correctly
Calling .bind on a Vars in a watched Binding definition leads to strange behavior. The new binding is updated only once at init time but not after updating the Vars content.
For example, if I do this:...
4
votes
1
answer
150
views
How to perform unit test for Binding.Scala?
I had written components using Binding.scala and they're working fine for me. Now I want to unit test them using ScalaTest. How to unit test them?
I had taken reference from Binding.scala's unit ...
3
votes
2
answers
150
views
How to set tabindex attribute
When using Binding.scala, I can not write html that uses the tabindex attribute.
Is this a bug in Binding.scala / scala.js?
<div>
<input tabindex="1"></input>
<input ...
2
votes
1
answer
167
views
Binding.scala: bind does not work in a simple example used in Github Pages
I want to use Binding.scala in my Github Pages.
The Problem I have is that the value that I bind is not updated.
Here the example:
val radiusVar = Var(3.0)
@dom
private lazy val plotly: ...
2
votes
3
answers
356
views
Type mismatch with Binding.scala involving scala.xml.Elem
I'm failing to compile a simple example of Binding.scala, and being a newbie, I have no intuition how to fix it. Maybe the README is slightly outdated? The example at https://github.com/...
1
vote
1
answer
151
views
Integrating React Component in a Binding.scala application
I would like to integrate react-table which is a React Component (can be seen in action here) in a Binding.scala application. I am however fairly new to both React and Binding.scala, and as such was ...
2
votes
2
answers
233
views
How to fix the red mark that appears when using binding.scala in intellij?
I am developing with scalajs and binding.scala. I'm using the IDE as an Intellij. However, when using dom macro in Intellij, the following red mark appears. this error appears when I use the attribute ...
8
votes
2
answers
10k
views
leaflet map does not appear correctly until resize
I am using Leaflet with scalajs-leaflet facade on Binding.scala, and the map initializes/appears incorrectly.
In order to reproduce the issue, i have prepared a lihaoyi/workbench page similar to ...
1
vote
1
answer
382
views
Binding.scala: how to define checked in a Checkbox
I want to define a checkbox in Binding.scala, like:
<input type="checkbox"
checked={elem.checked}
/>
elem.checked can have any String value (even an empty):the ...
-1
votes
1
answer
143
views
binding.scala component to string conversion
I have a binding.scala component and a third party scalajs library that takes html string as input. How can the b.s component can be passed to the library method as an argument?
Specifics:
import ...
0
votes
1
answer
134
views
Binding.scala: Get current value of a Binding
It seems it is not possible to get the current value of a Binding like we can do for a Var(using method value). I looked at the source and this method is declared as being private for Binding class, ...
2
votes
2
answers
181
views
Binding.scala route redirecting to login page
I would like add "guards" to certain urls. These urls should only be accessed when the user is logged in. If not logged in i want to redirect the user to the login page. After a successful login i ...