Fixed that input area is not resized when opening popup
This commit is contained in:
parent
17f5a81c17
commit
1af4d202ef
|
@ -13,6 +13,14 @@ export default class InputArea extends Component {
|
||||||
handleInputText = e => {
|
handleInputText = e => {
|
||||||
const inputText = e.target.value;
|
const inputText = e.target.value;
|
||||||
this.props.handleInputText(inputText);
|
this.props.handleInputText(inputText);
|
||||||
|
};
|
||||||
|
|
||||||
|
shouldComponentUpdate(nextProps) {
|
||||||
|
const shouldUpdate = this.props.inputText !== nextProps.inputText;
|
||||||
|
return shouldUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidUpdate = () => {
|
||||||
this.resizeTextArea();
|
this.resizeTextArea();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue