mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
ui_textinput_enable_multiline() only toggled white-space; is_multiline_mode was never set, so newlines were still filtered and autosize stayed single-line. Set the flag and expose a declarative multiline attribute for textinput, with an integration test covering newline handling.
24 lines
627 B
TypeScript
24 lines
627 B
TypeScript
import { widgetFields, FieldData } from "./widget";
|
|
|
|
export const textInputFields: FieldData[] = [
|
|
...widgetFields,
|
|
{
|
|
name: "placeholder",
|
|
type: "string",
|
|
default: "-",
|
|
description: {
|
|
en: "Placeholder text shown when the input is empty.",
|
|
"zh-CN": "输入为空时显示的占位文本。",
|
|
},
|
|
},
|
|
{
|
|
name: "multiline",
|
|
type: "boolean",
|
|
default: "false",
|
|
description: {
|
|
en: "Enables multi-line editing: newlines are kept and the widget sizes for multiple lines.",
|
|
"zh-CN": "启用多行编辑:保留换行符,并按多行高度自适应。",
|
|
},
|
|
},
|
|
];
|