Skip to content

Text

The text filter type is used for keyword search or freeform input. It supports both inline (compact with clear button inside input) and vertical (stacked layout) modes.

Component API

PropTypeDescription
type'text'Must be set to 'text'
placeholderstringPlaceholder inside the input
labelstringLabel displayed next to or above input
layout'inline' | 'vertical'Display style of the field
widthnumberField Width
interface
ts
interface Props {  
  type: string; // filterType
  placeholder?: string;
  label: string; 
}

interface Emits {
  (e: "update:modelValue", value: any): void;
  (e: "change", value: { name: string; value: any }): void;
  (e: "clear", name: string): void;
}

interface Slots {
   default?: (scope:{ row: object }) => VNode[]; 
}

Inline

Compact and aligned with other toolbar filters.

html
<filter-field
  name="search"
  type="text"
  layout="inline"
  label="Search"
  placeHolder="Search by keyword"
  v-model="searchQuery"
/>

{}

Vertical

Stacked in a sidebar or column layout.

vue
<filter-field
  name="search"
  type="text"
  layout="vertical"
  label="Search"
  placeHolder="Search by keyword"
  v-model="searchQuery"
/>
Search

{}