Form

dev.cheleb.scalamigen.Form
See theForm companion object
trait Form[A]

A form for a type A.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
Form[A]

Members list

Value members

Abstract methods

def render(path: List[Symbol], variable: Var[A], syncParent: () => Unit)(using factory: WidgetFactory, errorBus: EventBus[(String, ValidationEvent)]): L.HtmlElement

Render a form for a variable.

Render a form for a variable.

Sometimes the form is a part of a larger form and the parent form needs to be updated when the variable changes. This is the purpose of the syncParent function.

Value parameters

factory

the widget factory

syncParent

a function to sync the parent state

variable

the variable to render

Attributes

Concrete methods

def fromString(s: String): Option[A]

Parse a string and return an Option[A].

Parse a string and return an Option[A].

Attributes

def labelled(label: String, required: Boolean): Form[A]
def toString(a: A): String
def xmap[B](to: (B, A) => B)(from: B => A): Form[B]

Givens

Givens

given given_Owner: L.Owner