We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da406aa commit 3538c3dCopy full SHA for 3538c3d
packages/taro-ui/src/components/input/index.tsx
@@ -124,8 +124,8 @@ export default class AtInput extends React.Component<AtInputProps> {
124
placeholder,
125
placeholderStyle,
126
placeholderClass,
127
- autoFocus,
128
- focus,
+ autoFocus = false,
+ focus = false,
129
value,
130
required
131
} = this.props
@@ -174,7 +174,7 @@ export default class AtInput extends React.Component<AtInputProps> {
174
cursorSpacing={cursorSpacing}
175
maxlength={maxlength}
176
autoFocus={autoFocus}
177
- focus={focus}
+ {...(focus ? { focus } : {})}
178
value={value}
179
confirmType={confirmType}
180
cursor={cursor}
0 commit comments