You've already forked focalboard
mirror of
https://github.com/mattermost/focalboard.git
synced 2025-07-15 23:54:29 +02:00
Fixing some linter errors
This commit is contained in:
@ -101,7 +101,7 @@ class BoardComponent extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render(): JSX.Element {
|
render(): JSX.Element {
|
||||||
const {boardTree, showView, intl} = this.props
|
const {boardTree, showView} = this.props
|
||||||
|
|
||||||
if (!boardTree || !boardTree.board) {
|
if (!boardTree || !boardTree.board) {
|
||||||
return (
|
return (
|
||||||
@ -237,7 +237,7 @@ class BoardComponent extends React.Component<Props, State> {
|
|||||||
this.cardClicked(e, card)
|
this.cardClicked(e, card)
|
||||||
}}
|
}}
|
||||||
onDragStart={() => {
|
onDragStart={() => {
|
||||||
this.draggedCards = this.state.selectedCardIds.includes(card.id) ? this.state.selectedCardIds.map((id) => boardTree.allCards.find(o => o.id === id)) : [card]
|
this.draggedCards = this.state.selectedCardIds.includes(card.id) ? this.state.selectedCardIds.map((id) => boardTree.allCards.find((o) => o.id === id)) : [card]
|
||||||
}}
|
}}
|
||||||
onDragEnd={() => {
|
onDragEnd={() => {
|
||||||
this.draggedCards = []
|
this.draggedCards = []
|
||||||
@ -387,14 +387,14 @@ class BoardComponent extends React.Component<Props, State> {
|
|||||||
onClick={() => mutator.deletePropertyOption(boardTree, boardTree.groupByProperty, group.option)}
|
onClick={() => mutator.deletePropertyOption(boardTree, boardTree.groupByProperty, group.option)}
|
||||||
/>
|
/>
|
||||||
<Menu.Separator/>
|
<Menu.Separator/>
|
||||||
{Constants.menuColors.map((color) =>
|
{Constants.menuColors.map((color) => (
|
||||||
(<Menu.Color
|
<Menu.Color
|
||||||
key={color.id}
|
key={color.id}
|
||||||
id={color.id}
|
id={color.id}
|
||||||
name={color.name}
|
name={color.name}
|
||||||
onClick={() => mutator.changePropertyOptionColor(boardTree.board, boardTree.groupByProperty, group.option, color.id)}
|
onClick={() => mutator.changePropertyOptionColor(boardTree.board, boardTree.groupByProperty, group.option, color.id)}
|
||||||
/>),
|
/>
|
||||||
)}
|
))}
|
||||||
</Menu>
|
</Menu>
|
||||||
</MenuWrapper>
|
</MenuWrapper>
|
||||||
<IconButton
|
<IconButton
|
||||||
@ -508,10 +508,10 @@ class BoardComponent extends React.Component<Props, State> {
|
|||||||
// Cmd+Shift+Click: Extend the selection
|
// Cmd+Shift+Click: Extend the selection
|
||||||
const {boardTree} = this.props
|
const {boardTree} = this.props
|
||||||
const orderedCardIds = boardTree.orderedCards().map((o) => o.id)
|
const orderedCardIds = boardTree.orderedCards().map((o) => o.id)
|
||||||
const lastCardId = selectedCardIds[selectedCardIds.length-1]
|
const lastCardId = selectedCardIds[selectedCardIds.length - 1]
|
||||||
const srcIndex = orderedCardIds.indexOf(lastCardId)
|
const srcIndex = orderedCardIds.indexOf(lastCardId)
|
||||||
const destIndex = orderedCardIds.indexOf(card.id)
|
const destIndex = orderedCardIds.indexOf(card.id)
|
||||||
const newCardIds = (srcIndex < destIndex) ? orderedCardIds.slice(srcIndex, destIndex+1) : orderedCardIds.slice(destIndex, srcIndex+1)
|
const newCardIds = (srcIndex < destIndex) ? orderedCardIds.slice(srcIndex, destIndex + 1) : orderedCardIds.slice(destIndex, srcIndex + 1)
|
||||||
for (const newCardId of newCardIds) {
|
for (const newCardId of newCardIds) {
|
||||||
if (!selectedCardIds.includes(newCardId)) {
|
if (!selectedCardIds.includes(newCardId)) {
|
||||||
selectedCardIds.push(newCardId)
|
selectedCardIds.push(newCardId)
|
||||||
@ -521,7 +521,7 @@ class BoardComponent extends React.Component<Props, State> {
|
|||||||
} else {
|
} else {
|
||||||
// Shift+Click: add to selection
|
// Shift+Click: add to selection
|
||||||
if (selectedCardIds.includes(card.id)) {
|
if (selectedCardIds.includes(card.id)) {
|
||||||
selectedCardIds = selectedCardIds.filter((o) => o != card.id)
|
selectedCardIds = selectedCardIds.filter((o) => o !== card.id)
|
||||||
} else {
|
} else {
|
||||||
selectedCardIds.push(card.id)
|
selectedCardIds.push(card.id)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user