Expression Editor

The expression editor is for editing a filter expression.

Install

Add the component to your project:

Import the component and the CSS:

Use

Properties

Expression Editor uses metadata types from @funnel-io/meld-types.

nametypedescriptionrequireddefault
fieldsMetadata.DefinitionsAll appropriate fields from account metadatatrue
groupsMetadata.GroupsAll field groups from account metadatatrue
sourcesMetadata.SourcesAll sources from account metadatatrue
sourceTypesMetadata.SourceTypesAll sources types from account metadatatrue
expressionRootExpression | nullA supported filter expressiontrue
onChange(nextExpression: RootExpression | null ) => voidCalled when the expression changestrue
isDisabledField(field:Definition) => { isDisabled:Boolean, disabledReason: string } Should the field be disabled and whytrue
toDisplayValue<T = string | number>(value: T, fieldId: string) => T;Format raw value for displayfalse
fromDisplayValue<T = string | number>(value: T, fieldId: string) => T;Format input value for usefalse

Examples

Selecting a data source type

Selecting a data source

Using a regex

Fetching dimension values async

Search Gunnel

Powered byAlgolia