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.
name | type | description | required | default |
---|---|---|---|---|
fields | Metadata.Definitions | All appropriate fields from account metadata | true | |
groups | Metadata.Groups | All field groups from account metadata | true | |
sources | Metadata.Sources | All sources from account metadata | true | |
sourceTypes | Metadata.SourceTypes | All sources types from account metadata | true | |
expression | RootExpression | null | A supported filter expression | true | |
onChange | (nextExpression: RootExpression | null ) => void | Called when the expression changes | true | |
isDisabledField | (field:Definition) => { isDisabled:Boolean, disabledReason: string } | Should the field be disabled and why | true | |
toDisplayValue | <T = string | number>(value: T, fieldId: string) => T; | Format raw value for display | false | |
fromDisplayValue | <T = string | number>(value: T, fieldId: string) => T; | Format input value for use | false |