Fix incorrect top padding in tag selector if first tag doesn't fit
This commit is contained in:
parent
2a3c4a3555
commit
00c159a1b4
1 changed files with 2 additions and 2 deletions
|
@ -78,8 +78,8 @@ class TagList extends React.PureComponent {
|
|||
for (let i = 0; i < this.props.tags.length; i++) {
|
||||
let tag = this.props.tags[i];
|
||||
let tagWidth = tagPaddingLeft + Math.min(tag.width, tagMaxWidth) + tagPaddingRight;
|
||||
// If cell fits, add to current row
|
||||
if ((rowX + tagWidth) < (this.props.width - panePaddingLeft - panePaddingRight)) {
|
||||
// If first row or cell fits, add to current row
|
||||
if (i == 0 || ((rowX + tagWidth) < (this.props.width - panePaddingLeft - panePaddingRight))) {
|
||||
positions[i] = [rowX, panePaddingTop + (row * rowHeight)];
|
||||
}
|
||||
// Otherwise, start new row
|
||||
|
|
Loading…
Add table
Reference in a new issue