Campi Filtro
Number
Input numerico con formattazione locale e supporto valuta.
Panoramica
Campo numerico per filtri su colonne numeriche. Genera un filtro eq.valore (o con operatore personalizzato). Supporta modalità decimal e currency con formattazione automatica.
Anteprima live
Tipo
type: 'number'
Configurazione
import type { NumberFieldConfig } from '@pzeta/vue-ricerca'
const field: NumberFieldConfig = {
key: 'prezzo',
type: 'number',
label: 'Prezzo max',
mode: 'currency',
currency: 'EUR',
locale: 'it-IT',
minFractionDigits: 2,
postgrest: { operator: 'lte' },
}
Props specifiche
| Prop | Tipo | Default | Descrizione |
|---|---|---|---|
key | string | — | Chiave nel model |
label | string | — | Label del campo |
placeholder | string | — | Placeholder |
mode | 'decimal' | 'currency' | 'decimal' | Modalità formattazione |
currency | string | — | Codice valuta ISO (es. 'EUR') |
locale | string | 'it-IT' | Locale per formattazione |
min | number | — | Valore minimo consentito |
max | number | — | Valore massimo consentito |
minFractionDigits | number | 2 (currency) | Cifre decimali minime |
colSpan | number | 1 | Colonne grid occupate |
Query PostgREST generata
// { prezzo: 'lte.500' }