Set random icon on new cards

This commit is contained in:
Chen-I Lim 2020-10-15 19:38:00 -07:00
parent dbcbe286e7
commit c12ecdf3d7
2 changed files with 2 additions and 0 deletions

View file

@ -242,6 +242,7 @@ class BoardComponent extends React.Component<Props, State> {
const card = new Card()
card.parentId = boardTree.board.id
card.properties = CardFilter.propertiesThatMeetFilterGroup(activeView.filter, board.cardProperties)
card.icon = BlockIcons.shared.randomIcon()
if (boardTree.groupByProperty) {
card.properties[boardTree.groupByProperty.id] = groupByValue
}

View file

@ -360,6 +360,7 @@ class TableComponent extends React.Component<Props, State> {
const card = new Card()
card.parentId = boardTree.board.id
card.icon = BlockIcons.shared.randomIcon()
await mutator.insertBlock(
card,
"add card",