Skip to content

Commit 15296c8

Browse files
committed
Allow VariantTableWidget to use either full trackId or GUID alone
1 parent 1c1b265 commit 15296c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jbrowse/src/client/JBrowse/VariantSearch/components/VariantTableWidget.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ const VariantTableWidget = observer(props => {
4343
// The code expects a proper GUID, yet the trackId is a string containing the GUID + filename
4444
const trackGUID = truncateToValidGUID(props.trackId)
4545

46+
// NOTE: since the trackId is GUID+filename, allow exact string matching, or a match on the GUID portion alone.
47+
// Upstream code might only have access to the GUID and translating to the trackId isnt always easy
4648
const track = view.tracks.find(
47-
t => t.configuration.trackId === trackId,
49+
t => t.configuration.trackId === trackId || truncateToValidGUID(t.configuration.trackId).toUpperCase() === trackGUID.toUpperCase()
4850
)
4951

5052
if (!track) {

0 commit comments

Comments
 (0)