Lime Web Components API Documentation - v7.4.0
    Preparing search index...

    Type Alias AndOrExpression

    Logical AND or OR expression combining multiple filter conditions.

    Combines multiple Expressions with either AND or OR logic:

    • AND: All sub-expressions must be true for the object to match
    • OR: At least one sub-expression must be true for the object to match

    AND/OR expressions can be nested to create complex filtering logic. Use AND when all conditions must be met, OR when any condition can match.

    import { AndOrExpression, Operator } from '@limetech/lime-web-components';

    const activeAndWorthOver50k: AndOrExpression = {
    op: Operator.AND,
    exp: [
    { key: 'status', op: Operator.EQUALS, exp: 'active' },
    { key: 'value', op: Operator.GREATER, exp: 50_000 },
    ],
    };
    import { AndOrExpression, Operator } from '@limetech/lime-web-components';

    const urgentOrHighValue: AndOrExpression = {
    op: Operator.OR,
    exp: [
    { key: 'priority', op: Operator.EQUALS, exp: 'urgent' },
    { key: 'value', op: Operator.GREATER, exp: 1_000_000 },
    ],
    };
    import { AndOrExpression, Operator } from '@limetech/lime-web-components';

    const waitingOrOpenAndHighPriority: AndOrExpression = {
    op: Operator.AND,
    exp: [
    {
    op: Operator.OR,
    exp: [
    { key: 'status', op: Operator.EQUALS, exp: 'open' },
    { key: 'status', op: Operator.EQUALS, exp: 'waiting' },
    ],
    },
    { key: 'priority', op: Operator.EQUALS, exp: 'high' },
    ],
    };
    type AndOrExpression = {
        exp: Expression[];
        op: AND | OR;
    }
    Index

    Properties

    Properties

    exp: Expression[]

    Array of expressions to combine with the logical operator.

    op: AND | OR

    Logical operator: AND requires all expressions to match, OR requires at least one.