Skip to content

Commit

Permalink
core: pass context to when clause (#12329)
Browse files Browse the repository at this point in the history
The commit passes the `context` (which is generally assigned to toolbar
items) in order to determine the when clause for toolbar items.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto authored Mar 27, 2023
1 parent 441c5a1 commit f3819b2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export class TabBarToolbar extends ReactWidget {
}

protected evaluateWhenClause(whenClause: string | undefined): boolean {
return whenClause ? this.contextKeyService.match(whenClause) : true;
return whenClause ? this.contextKeyService.match(whenClause, this.current?.node) : true;
}

protected executeCommand = (e: React.MouseEvent<HTMLElement>) => {
Expand Down

0 comments on commit f3819b2

Please sign in to comment.