Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #397 from jtpio/variables-panel
Browse files Browse the repository at this point in the history
Various fixes to the variables main area panel
  • Loading branch information
afshin committed Mar 17, 2020
2 parents b4a68b5 + c74ab6b commit 92d8690
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
15 changes: 8 additions & 7 deletions src/variables/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ export class VariableDetails extends ReactWidget {
* Instantiate a new Body for the detail table of the selected variable.
* @param options The instantiation options for VariableDetails.
*/
constructor(options: VariablesDetails.IOptions) {
constructor(options: VariableDetails.IOptions) {
super();
const { details, commands, model, service, title } = options;

this.title.icon = variableIcon;
this.title.label = `${service.session?.connection?.name} - details of ${title}`;
this.title.label = `${service.session?.connection?.name} - ${title}`;
this.title.caption = this.title.label;

this._variables = details;
this._commands = commands;
Expand Down Expand Up @@ -163,12 +164,12 @@ const VariablesComponent = ({
const Tbody = (variables: VariablesModel.IVariable[]) => (
<tbody>
{variables
?.filter(variable => !filter.has(variable.evaluateName))
?.filter(variable => !filter?.has(variable.evaluateName))
.map(variable => (
<tr
onDoubleClick={() => onVariableDoubleClicked(variable)}
onClick={() => onVariableClicked(variable)}
key={variable.evaluateName}
key={`${variable.evaluateName}-${variable.type}-${variable.value}`}
>
<td>{variable.name}</td>
<td>{variable.type}</td>
Expand Down Expand Up @@ -214,11 +215,11 @@ namespace VariablesBodyTable {
}

/**
* A namespace for VariablesDetails `statics`.
* A namespace for VariableDetails `statics`.
*/
namespace VariablesDetails {
namespace VariableDetails {
/**
* Instantiation options for `VariablesDetails`.
* Instantiation options for `VariableDetails`.
*/
export interface IOptions {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/variables/tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const VariablesComponent = ({
<>
<ul>
{variables
?.filter(variable => !filter.has(variable.evaluateName))
?.filter(variable => !filter?.has(variable.evaluateName))
.map(variable => {
const key = `${variable.evaluateName}-${variable.type}-${variable.value}`;
return (
Expand Down
1 change: 1 addition & 0 deletions style/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
.jp-DebuggerVariableDetails {
color: var(--jp-ui-font-color1);
font-size: var(--jp-ui-font-size1);
overflow: auto;
}

.jp-DebuggerVariableDetails table,
Expand Down

0 comments on commit 92d8690

Please sign in to comment.