Skip to main content

parse

Description

Controls how input text is interpreted and parsed into a structured filter

Use it to choose between full structured parsing with a free-text fallback, strict field-only syntax enforcement, or disabling parsing entirely when you want to handle the raw input yourself.

Usage

parse?: "none" | "strict" | "allowFreeText";

Default: "allowFreeText"

  • "allowFreeText" - (default) Parses structured field-value syntax (status: Open) and also accepts plain words as free-text search. Unrecognized words are matched as contains-filters across all text fields.
  • "strict" - Parses only valid field-value syntax. Any text that does not match a known field or operator is highlighted as an error, and the onchange event receives a validation error.
  • "none" - Disables parsing entirely. Syntax highlighting and autocomplete are turned off. The onchange event receives the raw query string as value instead of structured group of filtering rules.

Example

<template>
<!-- Default: structured queries plus free-text fallback -->
<FilterQuery :fields="fields" parse="allowFreeText" :onchange="handleChange" />

<!-- Strict: only valid field syntax is accepted -->
<FilterQuery :fields="fields" parse="strict" :onchange="handleChange" />

<!-- Disabled: forward raw input to an AI or NLP endpoint -->
<FilterQuery parse="none" :onchange="({ value }) => sendToBackend(value)" />
</template>

Related articles: Filtering data