Skip to content

Commit

Permalink
Merge branch 'master' of github.com:alibaba-fusion/next
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed Oct 15, 2021
2 parents 002d928 + 0642bb9 commit 087d9ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/input/base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ class Base extends React.Component {
renderControl() {
const lenWrap = this.renderLength();

return lenWrap ? <span className={`${this.props.prefix}input-control`}>{lenWrap}</span> : null;
return lenWrap ? (
<span onClick={() => this.focus()} className={`${this.props.prefix}input-control`}>
{lenWrap}
</span>
) : null;
}

getClass() {
Expand Down
2 changes: 1 addition & 1 deletion src/input/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default class Input extends Base {
}

return clearWrap || lenWrap || stateWrap || extra ? (
<span className={`${prefix}input-control`}>
<span onClick={() => this.focus()} className={`${prefix}input-control`}>
{clearWrap}
{lenWrap}
{stateWrap}
Expand Down

0 comments on commit 087d9ab

Please sign in to comment.