gristlabs_grist-core/app/common/DropdownCondition.ts
George Gevoian 3112433a58 (core) Add dropdown conditions
Summary:
Dropdown conditions let you specify a predicate formula that's used to filter
choices and references in their respective autocomplete dropdown menus.

Test Plan: Python and browser tests (WIP).

Reviewers: jarek, paulfitz

Reviewed By: jarek

Subscribers: dsagal, paulfitz

Differential Revision: https://phab.getgrist.com/D4235
2024-04-26 16:57:55 -04:00

21 lines
470 B
TypeScript

import { CompiledPredicateFormula } from 'app/common/PredicateFormula';
export interface DropdownCondition {
text: string;
parsed: string;
}
export type DropdownConditionCompilationResult =
| DropdownConditionCompilationSuccess
| DropdownConditionCompilationFailure;
interface DropdownConditionCompilationSuccess {
kind: 'success';
result: CompiledPredicateFormula;
}
interface DropdownConditionCompilationFailure {
kind: 'failure';
error: string;
}