Skip to content

Commit

Permalink
instrument watch moves to row if existing listing is added
Browse files Browse the repository at this point in the history
  • Loading branch information
ettec committed Oct 31, 2020
1 parent 1ec52dc commit 0b7974e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,13 @@ export default class InstrumentListingWatch extends Component<InstrumentListingW

addListing(listing?: Listing) {
if (listing) {
this.watchesView.addListing(listing.getId())
if (!this.watchesView.addListing(listing.getId())) {
let node = this.gridApi?.getRowNode(listing.getId().toString())
if(node) {
this.gridApi?.ensureNodeVisible(node)
this.gridApi?.selectNode(node)
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class InstrumentListingWatchesView implements QuoteListener {
}


addListing(listingId: number) {
addListing(listingId: number) : boolean {



Expand All @@ -63,9 +63,10 @@ export class InstrumentListingWatchesView implements QuoteListener {
})

this.quoteSvc.SubscribeToQuote(listingId, this)

return true
}

return false
}

onQuote(quote: ClobQuote): void {
Expand Down

0 comments on commit 0b7974e

Please sign in to comment.