Skip to content

Commit

Permalink
🐛 dismiss focused entities when selection is cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Dec 11, 2024
1 parent 169c575 commit ca219c1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,12 @@ export class EntitySelector extends React.Component<{
const { partitionedSearchResults } = this
if (this.searchInput) {
const { selected = [] } = partitionedSearchResults ?? {}
this.selectionArray.deselectEntities(
selected.map((entity) => entity.name)
)
const entityNames = selected.map((entity) => entity.name)
this.selectionArray.deselectEntities(entityNames)
this.manager.focusArray?.deactivate(...entityNames)
} else {
this.selectionArray.clearSelection()
this.manager.focusArray?.clear()
}
}

Expand Down

0 comments on commit ca219c1

Please sign in to comment.