Skip to main content

ExpressionInputProps

@lowcode/ui-kit


Interface: ExpressionInputProps

Defined in: components/form/ExpressionInput.tsx:7

Extends​

  • Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange">

Properties​

errorText?​

optional errorText: string

Defined in: components/form/ExpressionInput.tsx:35

Текст ошибки под полем. При наличии errorText helperText не отображается.


hasError?​

optional hasError: boolean

Defined in: components/form/ExpressionInput.tsx:47

Внешний флаг ошибки (например, если валидация происходит выше). Управляет только aria-invalid, но не текстами.


helperText?​

optional helperText: string

Defined in: components/form/ExpressionInput.tsx:29

Текст-подсказка под полем (вторичный текст).


label?​

optional label: ReactNode

Defined in: components/form/ExpressionInput.tsx:12

Заголовок поля (подпись сверху).


onChange()​

onChange: (value) => void

Defined in: components/form/ExpressionInput.tsx:24

Коллбэк при изменении значения.

ВАЖНО: наружу уходит уже строка, а не SyntheticEvent.

Parameters​

value​

string

Returns​

void


onEvaluate()?​

optional onEvaluate: (value) => void

Defined in: components/form/ExpressionInput.tsx:58

Коллбэк нажатия на Evaluate. Получает текущее значение выражения.

Parameters​

value​

string

Returns​

void


onOpenEditor()?​

optional onOpenEditor: () => void

Defined in: components/form/ExpressionInput.tsx:68

Коллбэк открытия редактора выражений.

Returns​

void


showEvaluateButton?​

optional showEvaluateButton: boolean

Defined in: components/form/ExpressionInput.tsx:52

Рендерить ли кнопку Evaluate.


showOpenInEditor?​

optional showOpenInEditor: boolean

Defined in: components/form/ExpressionInput.tsx:63

Показывать кнопку "Open in editor" в углу поля.


successText?​

optional successText: string

Defined in: components/form/ExpressionInput.tsx:41

Текст успешной валидации. Показывается, если нет errorText.


value​

value: string

Defined in: components/form/ExpressionInput.tsx:17

Текущее значение выражения (строка).