Skip to content

Commit

Permalink
Merge pull request patternfly#143 from jeff-phillips-18/mobx-fix
Browse files Browse the repository at this point in the history
fix(mobx): Configure mobx to isolate state
  • Loading branch information
jeff-phillips-18 authored Feb 15, 2024
2 parents 2e52be2 + 5b22dfa commit 7a13627
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/module/src/Visualization.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentType } from 'react';
import { action, computed, observable, makeObservable } from 'mobx';
import { action, computed, observable, makeObservable, configure } from 'mobx';
import * as _ from 'lodash';
import {
Controller,
Expand All @@ -24,6 +24,9 @@ import {
import defaultElementFactory from './elements/defaultElementFactory';
import Stateful from './utils/Stateful';

// Configure MobX to isolate state, this allows for applications to use different versions of MobX
configure({ isolateGlobalState: true });

export class Visualization extends Stateful implements Controller {
elements: { [id: string]: GraphElement } = {};

Expand Down

0 comments on commit 7a13627

Please sign in to comment.