show placeholder of timeline empty
This commit is contained in:
parent
68f644c824
commit
08ad69847c
3 changed files with 13 additions and 0 deletions
|
@ -96,6 +96,9 @@ var TimelinePanel = React.createClass({
|
|||
|
||||
// shape property to be passed to EventTiles
|
||||
tileShape: React.PropTypes.string,
|
||||
|
||||
// placeholder text to use if the timeline is empty
|
||||
empty: React.PropTypes.string,
|
||||
},
|
||||
|
||||
statics: {
|
||||
|
@ -990,6 +993,14 @@ var TimelinePanel = React.createClass({
|
|||
);
|
||||
}
|
||||
|
||||
if (this.state.events.length == 0) {
|
||||
return (
|
||||
<div className={ this.props.className + " mx_RoomView_messageListWrapper" }>
|
||||
<div className="mx_RoomView_empty">{ this.props.empty }</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// give the messagepanel a stickybottom if we're at the end of the
|
||||
// live timeline, so that the arrival of new events triggers a
|
||||
// scroll.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue