Skip to content

Commit 0574eed

Browse files
committed
[fixed] show more row layout issues
1 parent 7ee9959 commit 0574eed

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/EventEndingRow.jsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ let EventRow = React.createClass({
3737
continue;
3838
}
3939

40+
let gap = Math.max(0, left - lastEnd);
41+
4042
if (this.canRenderSlotEvent(left, span)) {
41-
let gap = left - lastEnd;
4243
let content = this.renderEvent(event)
4344

4445
if (gap)
@@ -51,6 +52,9 @@ let EventRow = React.createClass({
5152
lastEnd = current = (right + 1);
5253
}
5354
else {
55+
if (gap)
56+
row.push(this.renderSpan(gap, key + '_gap'))
57+
5458
row.push(this.renderSpan(1, key, this.renderShowMore(segments, current)))
5559
current++;
5660
}
@@ -88,6 +92,11 @@ let EventRow = React.createClass({
8892
{messages.showMore(count)}
8993
</a>
9094
) : false
95+
},
96+
97+
_showMore(slot, e){
98+
e.preventDefault()
99+
this.props.onShowMore(slot)
91100
}
92101
});
93102

0 commit comments

Comments
 (0)