Fixed that input area is not resized when opening popup

This commit is contained in:
sienori 2019-02-24 05:26:51 +09:00
parent 17f5a81c17
commit 1af4d202ef

View file

@ -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();
}; };