SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface FormulaInputProps

    Props for the plain-DOM FormulaInput — the UI-kit-free field whose value is an ICalculation.IFormula.

    interface FormulaInputProps {
        allowCrossSheet?: boolean;
        allowMulti?: boolean;
        apiRef?: Ref<FormulaInputApi>;
        argument?: FormulaArgument | null;
        changeOn?: "done" | "live";
        equals?: FormulaInputEquals;
        grammar?: FormulaInputGrammar;
        hideAdornment?: boolean;
        hideError?: boolean;
        home?: Partial<CellCoords>;
        onChangeInput?: (value: IFormula | null) => void;
        onChangeText?: (text: string) => void;
        onDone?: (value: IFormula | null, args: ReferenceDoneArgs) => void;
        pickAs?: "absolute" | "relative";
        pickSpills?: boolean;
        value: string | ICellRanges | IFormula | null;
        workbook?: IWorkbook | null;
    }

    Hierarchy

    • Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange">
      • FormulaInputProps
    Index
    allowCrossSheet?: boolean

    Whether references may reach other sheets. Default true. Set false for a single-sheet input (a table's range, conditional formatting's "Applies to"): typed cross-sheet references become errors, the grid refuses picks on other sheets, and addresses display bare. See UseFormulaInputOptions.allowCrossSheet; independent of allowMulti.

    allowMulti?: boolean

    Allow a comma-separated multi-range reference (typed, or Ctrl+click-picked). Default false. 'reference' grammar only — a 'formula' field always allows every reference its expression holds.

    apiRef?: Ref<FormulaInputApi>

    The headless field API, for host-driven commit points (a dialog's OK → apiRef.current?.commit()).

    argument?: FormulaArgument | null

    The call argument this field's whole text is — the Function Arguments form's rows. An empty field then offers, in its hint popup, the values the parameter is limited to. See UseFormulaHintsOptions.getArgument.

    changeOn?: "done" | "live"

    'done' suppresses the live notifications — the host hears only onDone. Default 'live'.

    Leading-= policy. Default 'optional' (=SUM(A1) and SUM(A1) mean the same formula). 'formula' grammar only — a 'reference' field never takes one.

    The field's grammar. 'formula' (default) accepts any expression (=SUM(A1:A5)*2); 'reference' is the "limit input" specialization — a pure reference list (Sheet1!A1:B2, Sheet2!C1), rejecting function calls and computed references per ICalculation.IFormula.isReferenceOnly (Excel's RefEdit contract). See FormulaInputGrammar.

    hideAdornment?: boolean

    Hide the adornment cluster (✓/✗ while engaged in modal mode; the select-current action).

    hideError?: boolean

    Hide the error line under the field (hosts that surface api.error themselves).

    home?: Partial<CellCoords>

    The field's HOME anchor — the coords (with scope) a bare reference (A1) resolves against and serializes bare for. Pass it when the host has one (a table's sheet, a conditional-format rule's cell, a chart's sheet). BOTH grammars honor it — a field with no home has no bare form and stays fully qualified, picks included; the visible tab does not stand in for one.

    onChangeInput?: (value: IFormula | null) => void

    Live change notification (valid states only). See UseFormulaInputOptions.onChange.

    onChangeText?: (text: string) => void

    Raw display-text notification — invalid states included, regardless of changeOn. For hosts that persist authored TEXT rather than a parsed value. See UseFormulaInputOptions.onChangeText.

    onDone?: (value: IFormula | null, args: ReferenceDoneArgs) => void

    The commit channel. See UseFormulaInputOptions.onDone.

    pickAs?: "absolute" | "relative"

    What a PICK writes — 'absolute' ($A$1:$B$2) or 'relative' (A1:B2). Default 'relative' (the cell editor's behavior). A DEFAULT, not a constraint: typing and F4 still reach either form, and a value handed in keeps the fixability it came with. 'absolute' is the defined-name and table-resize shape. See UseFormulaInputOptions.pickAs.

    pickSpills?: boolean

    Whether a pick that is exactly a dynamic array's spill writes D2# instead of its address. Default false, as Excel's range fields; the cell editor always does. See UseFormulaInputOptions.pickSpills.

    value: string | ICellRanges | IFormula | null

    The committed value. See UseFormulaInputOptions.value.

    workbook?: IWorkbook | null

    Resolution/picking context. Defaults to the enclosing WorkbookContext.