Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

SelectField

interfaz Since 1.5.0

Lo que <MeekoSelect> lee de form.field('x') de useForm: el id, el name, la señal del valor, invalid y describedBy. Un FormField lo cumple.

ts
import type { SelectField } from "@meekojs/meeko/framework";

Source code src/app/components/MeekoSelect/types.ts:94

Declaración #

ts
interface SelectField<Value> {
	readonly id: string
	readonly name: string
	readonly value: Signal<Value>
	readonly invalid: ReadonlySignal<boolean>
	readonly describedBy: ReadonlySignal<string | undefined>
}

Type parameters #

Value

Example #

meeko
<MeekoSelect bind:field="form.field('color')" bind:options="colors" />

Propiedades #

id #

propiedad sólo lectura

readonly id: string

id del disparador, para el <label for> del campo.

name #

propiedad sólo lectura

readonly name: string

name de los <input type="hidden">.

value #

propiedad sólo lectura

readonly value: Signal<Value>

La señal del campo, que sustituye al modelo.

invalid #

propiedad sólo lectura

readonly invalid: ReadonlySignal<boolean>

true si el campo tiene un error: aria-invalid="true".

describedBy #

propiedad sólo lectura

readonly describedBy: ReadonlySignal<string | undefined>

aria-describedby del disparador, el mensaje de error mientras lo hay.

See also #

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/app/components/MeekoSelect/types.ts