Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cc5a185

Browse files
committed
fix focus on the Last Character in Text Input
1 parent 692b0a2 commit cc5a185

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎packages/react-bootstrap-table2/src/text-editor.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@ import React, { Component } from 'react';
33

44
class TextEditor extends Component {
55
componentDidMount() {
6+
this.text.value = defaultValue;
67
this.text.focus();
78
}
89

910
render() {
11+
const {
12+
onKeyDown,
13+
onBlur
14+
} = this.props;
1015
return (
1116
<input
1217
ref={ node => this.text = node }
1318
type="text"
1419
className="form-control editor edit-text"
15-
{ ...this.props }
20+
onKeyDown={onKeyDown}
21+
onBlur={onBlur}
1622
/>
1723
);
1824
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /