Update placeholder when it changes, not sure how this ever worked
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
1475f5c73a
commit
52ed55d887
|
@ -94,6 +94,17 @@ export default class BasicMessageEditor extends React.Component {
|
|||
this._emoticonSettingHandle = null;
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.placeholder !== prevProps.placeholder && this.props.placeholder) {
|
||||
const {isEmpty} = this.props.model;
|
||||
if (isEmpty) {
|
||||
this._showPlaceholder();
|
||||
} else {
|
||||
this._hidePlaceholder();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_replaceEmoticon = (caretPosition, inputType, diff) => {
|
||||
const {model} = this.props;
|
||||
const range = model.startRange(caretPosition);
|
||||
|
|
Loading…
Reference in New Issue