mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Update placeholder when it changes, not sure how this ever worked
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
1475f5c73a
commit
52ed55d887
1 changed files with 11 additions and 0 deletions
|
@ -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 a new issue