@datagrok/peptides 1.21.3 → 1.21.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/peptides",
3
3
  "friendlyName": "Peptides",
4
- "version": "1.21.3",
4
+ "version": "1.21.4",
5
5
  "author": {
6
6
  "name": "Davit Rizhinashvili",
7
7
  "email": "drizhinashvili@datagrok.ai"
@@ -427,7 +427,7 @@ export abstract class SARViewer extends DG.JsViewer implements ISARViewer {
427
427
 
428
428
  private resetTargetCategoryValue(): void {
429
429
  const colName = this.targetColumnName;
430
- const col = this.dataFrame.col(colName);
430
+ const col = colName ? this.dataFrame.col(colName) : null;
431
431
  this.targetCategoryInput.items = col?.categories ?? [];
432
432
  this.targetCategoryInput.value = null;
433
433
  if (!colName)
@@ -676,11 +676,11 @@ export class MonomerPosition extends SARViewer {
676
676
  if (isApplicableDataframe(this.dataFrame)) {
677
677
  this.getProperty(`${MONOMER_POSITION_PROPERTIES.COLOR}${COLUMN_NAME}`)
678
678
  ?.set(this, this.activityColumnName);
679
- this.targetColumnInput = ui.input.column('Target', {value: undefined, nullable: true, table: this.dataFrame,
679
+ this.targetColumnInput = ui.input.column('Target', {value: undefined, nullable: true, table: this.dataFrame, filter: (col: DG.Column) => col.isCategorical,
680
680
  onValueChanged: (value) => {
681
681
  const prop = this.getProperty(`${SAR_PROPERTIES.TARGET}${COLUMN_NAME}`);
682
- if (prop && prop.get(this) !== value.name)
683
- prop?.set(this, value.name ?? null);
682
+ if (prop && prop.get(this) != (value?.name ?? null))
683
+ prop?.set(this, value?.name ?? null);
684
684
  },
685
685
  });
686
686
  } else {