-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agenda no events msg #923
Agenda no events msg #923
Changes from 2 commits
053e62f
9437886
f1fbc33
0c600a9
20d3e01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,26 +48,34 @@ class Agenda extends React.Component { | |
|
||
return ( | ||
<div className="rbc-agenda-view"> | ||
<table ref="header" className="rbc-agenda-table"> | ||
<thead> | ||
<tr> | ||
<th className="rbc-header" ref="dateCol"> | ||
{messages.date} | ||
</th> | ||
<th className="rbc-header" ref="timeCol"> | ||
{messages.time} | ||
</th> | ||
<th className="rbc-header">{messages.event}</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
<div className="rbc-agenda-content" ref="content"> | ||
<table className="rbc-agenda-table"> | ||
<tbody ref="tbody"> | ||
{range.map((day, idx) => this.renderDay(day, events, idx))} | ||
</tbody> | ||
</table> | ||
</div> | ||
{events.length !== 0 ? ( | ||
<React.Fragment> | ||
<table ref="header" className="rbc-agenda-table"> | ||
<thead> | ||
<tr> | ||
<th className="rbc-header" ref="dateCol"> | ||
{messages.date} | ||
</th> | ||
<th className="rbc-header" ref="timeCol"> | ||
{messages.time} | ||
</th> | ||
<th className="rbc-header">{messages.event}</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
<div className="rbc-agenda-content" ref="content"> | ||
<table className="rbc-agenda-table"> | ||
<tbody ref="tbody"> | ||
{range.map((day, idx) => this.renderDay(day, events, idx))} | ||
</tbody> | ||
</table> | ||
</div> | ||
</React.Fragment> | ||
) : ( | ||
<span className="rbc-agenda-empty"> | ||
There are no events in this range | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we can configure other labels, I think it should be configurable as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</span> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
@@ -164,6 +172,8 @@ class Agenda extends React.Component { | |
} | ||
|
||
_adjustHeader = () => { | ||
if (!this.refs.tbody) return | ||
|
||
let header = this.refs.header | ||
let firstRow = this.refs.tbody.firstChild | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be configurable. It should go in
messages
and added to the top level calendar prop-type as wellThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also add some default styling