# ReferenceManagementSessionMixin

Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the [developer guide](https://jbrowse.org/jb2/docs/developer_guide/) for concepts. Built into JBrowse core. [View source](https://github.com/GMOD/jbrowse-components/blob/main/packages/product-core/src/Session/ReferenceManagement.ts).

Adds to a session a lookup of the views and widgets that refer to a track,
and an action that hides the track in those views and closes those widgets.

## Methods

| Member | Description |
| --- | --- |
| **getReferringMultiple**<br><code>(trackIds: string[]) =&gt; Map&lt;string, ReferringNode[]&gt;</code> | Walk the tree once and map each requested trackId to the nodes holding a `types.reference` that resolves to it (a view's track entry, a config editor widget). Track configs are matched by trackId, not identity, so a frozen base and its hydrated MST node compare equal. |
| **getReferring**<br><code>(trackId: string) =&gt; ReferringNode[]</code> | The nodes currently referring to `trackId` (see getReferringMultiple). |

## Actions

| Member | Description |
| --- | --- |
| **dereferenceTrack**<br><code>(trackId: string, referring: ReferringNode[]) =&gt; void</code> | Remove `trackId` from every view referring to it and close any config editor widget open on it. Runs immediately: the walk that produced `referring` has finished, so mutating those views here is safe. |

