Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

onFocusMount #6

Description

@mathieuleclaire

Hi,
I am tryiing to reproduce Laminar Hello World example, but the onMountFocus raises a js exception. Is it an exepected behaviour ?

val component = div(
      Textfield(
        _ => onMountFocus,
        _ => value <-- actionVar.signal,
        _ => inContext { thisNode => onInput.mapTo(thisNode.ref.value) --> actionVar },
        _.label := "Name",
        _.outlined := true,
        _.placeholder := "Name"
      ),
      span(
        "Hello, ",
        child.text <-- actionVar.signal.map(_.toUpperCase)
      )
    )

raises the js exception:

ObserverError: TypeError: this.formElement is null

Thanks, and congrats for this work !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions