Sidebar - click on options button shouldn't trigger change board

This commit is contained in:
Chen-I Lim 2020-10-13 14:10:33 -07:00
parent 61a6bac9dc
commit 5e7712d9f2
2 changed files with 8 additions and 3 deletions

View file

@ -25,8 +25,8 @@ class Sidebar extends React.Component<Props> {
boards.map(board => {
const displayTitle = board.title || "(Untitled Board)"
return (
<div key={board.id} className="octo-sidebar-item octo-hover-container" onClick={() => { this.boardClicked(board) }}>
<div>{board.icon ? `${board.icon} ${displayTitle}` : displayTitle}</div>
<div key={board.id} className="octo-sidebar-item octo-hover-container">
<div className="octo-sidebar-title" onClick={() => { this.boardClicked(board) }}>{board.icon ? `${board.icon} ${displayTitle}` : displayTitle}</div>
<div className="octo-spacer"></div>
<div className="octo-button square octo-hover-item" onClick={(e) => { this.showOptions(e, board) }}><div className="imageOptions" /></div>
</div>
@ -67,6 +67,8 @@ class Sidebar extends React.Component<Props> {
}
}
Menu.shared.showAtElement(e.target as HTMLElement)
e.stopPropagation()
}
private boardClicked(board: Board) {

View file

@ -102,10 +102,13 @@ hr {
flex-direction: row;
font-weight: 500;
cursor: pointer;
padding: 3px 20px;
}
.octo-sidebar-title {
cursor: pointer;
}
.octo-sidebar-item:hover {
background-color: rgba(0, 0, 0, 0.05);
}