Skip to content

Commit 3ed4c97

Browse files
committed
[Feat]: Add tabindex for textarea
1 parent 9fe0f69 commit 3ed4c97

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client/packages/lowcoder/src/comps/comps/textInputComp/textAreaComp.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { trans } from "i18n";
3333
import { RefControl } from "comps/controls/refControl";
3434
import { TextAreaRef } from "antd/es/input/TextArea";
3535
import { blurMethod, focusWithOptions } from "comps/utils/methodUtils";
36+
import { NumberControl } from "comps/controls/codeControl";
3637

3738
import React, { useContext, useEffect } from "react";
3839
import { EditorContext } from "comps/editorState";
@@ -80,7 +81,8 @@ let TextAreaTmpComp = (function () {
8081
labelStyle: styleControl(LabelStyle ,'labelStyle' ),
8182
textAreaScrollBar: withDefault(BoolControl, false),
8283
inputFieldStyle: styleControl(InputLikeStyle , 'inputFieldStyle'),
83-
animationStyle: styleControl(AnimationStyle, 'animationStyle')
84+
animationStyle: styleControl(AnimationStyle, 'animationStyle'),
85+
tabIndex: NumberControl
8486
};
8587
return new UICompBuilder(childrenMap, (props) => {
8688
const [inputProps, validateState] = useTextInputProps(props);
@@ -96,6 +98,7 @@ let TextAreaTmpComp = (function () {
9698
allowClear={props.allowClear}
9799
style={{ height: "100% !important", resize: "vertical" }}
98100
$style={props.inputFieldStyle}
101+
tabIndex={typeof props.tabIndex === 'number' ? props.tabIndex : undefined}
99102
/>
100103
</Wrapper>
101104
),
@@ -128,6 +131,7 @@ let TextAreaTmpComp = (function () {
128131
<Section name={sectionNames.advanced}>
129132
{allowClearPropertyView(children)}
130133
{readOnlyPropertyView(children)}
134+
{children.tabIndex.propertyView({ label: trans("prop.tabIndex") })}
131135
</Section>
132136
<TextInputValidationSection {...children} /></>
133137
)}

0 commit comments

Comments
 (0)