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])(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

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 renderLabel(label: String, required: Boolean)(using factory: WidgetFactory): L.HtmlElement

Render the label form associated with a variable

Render the label form associated with a variable

Value parameters

factory

the widget factory

label

label of the variable

required

if the variable is mandatory or not

Attributes

def toString(a: A): String
def withFieldName(n: String): Form[A] & Form[A]
def withPanelConfig(label: Option[String], asTable: Boolean): Form[A] & Form[A]
def xmap[B](to: (B, A) => B)(from: B => A): Form[B]

Givens

Givens

given given_Owner: L.Owner