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.

SelectSnippets

interfaz Since 1.5.0

Snippets de <MeekoSelect>, tipados con el tipo de sus opciones.

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

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

Declaración #

ts
interface SelectSnippets<T> {
	option?: [option: T, state: SelectOptionState]
	value?: [option: T]
	group?: [name: string]
	empty?: []
	loading?: []
}

Type parameters #

T

Example #

meeko
<MeekoSelect model="user" bind:options="users.value" by="id">
  <snippet name="option" params="user, state">{user.name}</snippet>
  <snippet name="value" params="user">{user.name}</snippet>
  <snippet name="empty">Nadie con ese nombre</snippet>
</MeekoSelect>

Propiedades #

option #

propiedad opcional

option?: [option: T, state: SelectOptionState]

Contenido de cada opción de la lista; sin él, su etiqueta.

value #

propiedad opcional

value?: [option: T]

Cómo se muestra cada valor elegido en el disparador; sin él, las etiquetas separadas por comas.

group #

propiedad opcional

group?: [name: string]

Encabezado de un grupo de groupBy; sin él, su nombre.

empty #

propiedad opcional

empty?: []

Lo que se muestra cuando no hay opciones; sin él, «Sin resultados».

loading #

propiedad opcional

loading?: []

Lo que se muestra mientras una búsqueda asíncrona carga.

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