From 40e672474a0fafca4ac9a57de32d2c8eaad4bca4 Mon Sep 17 00:00:00 2001 From: Dennis Hendriksen Date: Mon, 18 Jan 2021 08:53:05 +0100 Subject: [PATCH] Fix #104 Abbreviate HGVS C and HGVS P values in record table --- src/components/RecordInfoDetailsItemValue.vue | 50 +++++++++++-------- src/mocks/apiDataMock.ts | 4 +- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/components/RecordInfoDetailsItemValue.vue b/src/components/RecordInfoDetailsItemValue.vue index 63c56ada..cd69d2e1 100644 --- a/src/components/RecordInfoDetailsItemValue.vue +++ b/src/components/RecordInfoDetailsItemValue.vue @@ -34,29 +34,25 @@ {{ value }} - {{ value }} - - - - {{ value.indexOf(':') !== -1 ? value.substring(value.indexOf(':') + 1) : value }} - + + + {{ getHgvsText(value) }} - {{ value }} - {{ value.indexOf(':') !== -1 ? value.substring(value.indexOf(':') + 1) : value }} + {{ getHgvsText(value) }} 29) { + textValue = textValue.substring(0, 26) + '...'; + } + } + return textValue; } } }); diff --git a/src/mocks/apiDataMock.ts b/src/mocks/apiDataMock.ts index 97e39289..d3433244 100644 --- a/src/mocks/apiDataMock.ts +++ b/src/mocks/apiDataMock.ts @@ -582,8 +582,8 @@ export const apiData: ApiData = { 'protein_coding', '5/5', null, - 'ENST00000377205.1:c.619C>T', - 'ENSP00000366410.1:p.Arg207Trp', + 'ENST00000377205.1:c.619C>Tabcdefghijklmnopqrstuvwqyzabcdefghijklmnopqrstuvwqyzabcdefghijklmnopqrstuvwqyz', + 'ENSP00000366410.1:p.Arg207Trpabcdefghijklmnopqrstuvwqyzabcdefghijklmnopqrstuvwqyzabcdefghijklmnopqrstuvwqyz', '763', '619', '207',