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

PropTipoDefaultDescrizione
keystringChiave nel model
labelstringLabel del campo
placeholderstringPlaceholder
mode'decimal' | 'currency''decimal'Modalità formattazione
currencystringCodice valuta ISO (es. 'EUR')
localestring'it-IT'Locale per formattazione
minnumberValore minimo consentito
maxnumberValore massimo consentito
minFractionDigitsnumber2 (currency)Cifre decimali minime
colSpannumber1Colonne grid occupate

Query PostgREST generata

// { prezzo: 'lte.500' }