iobio / gene.iobio

Gene.iobio vue
MIT License
55 stars 11 forks source link

Clicking on a ClinVar variant in the clinvar track results in Vue.js warning about immutable props being changed #1016

Closed tonydisera closed 8 months ago

tonydisera commented 8 months ago

This bug was introduced with #846.

Screenshot 2023-10-19 at 8 58 55 PM
tonydisera commented 8 months ago

This was happening due to code that was setting VariantInspectCard.selectedVariantInfo in annotateClinvarVariant(), which occurred when user clicked on a ClinVar variant in the ClinVar track. There are two problems with this code:

  1. The wrong variable was being initialized (in VariantInspect.refreshedSelectedVariantInfo()). The code should have been setting the variable this.info, not this.selectedVariantInfo, which is the new field introduced with #846. this.selectedVariantInfocontains the checked annotations from the new dialog SelectVariantAnnotationsDialog.
  2. This refresh wasn't needed in the first place. The property info is passed in from GeneHome, which contains the variant info formatted when a variant is selected.