Skip to content

Commit

Permalink
Merge pull request #20 from MetaCell/feature/18
Browse files Browse the repository at this point in the history
Feature/18
  • Loading branch information
afonsobspinto authored Aug 1, 2022
2 parents aece67f + 0645ae6 commit 598cdb6
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 19 deletions.
15 changes: 9 additions & 6 deletions dist/meta-diagram.cjs.development.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/meta-diagram.cjs.development.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/meta-diagram.cjs.production.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/meta-diagram.cjs.production.min.js.map

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions dist/meta-diagram.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/meta-diagram.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.1",
"version": "0.1.3",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/react-diagrams/MetaLinkFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class MetaLinkFactory extends DefaultLinkFactory {
return (
// @ts-ignore
<ReactComponentType
key={`link-factory-${model.getOptions().id}`}
engine={this.engine}
model={model}
path={path}
Expand Down
10 changes: 8 additions & 2 deletions src/react-diagrams/MetaNodeFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ export class MetaNodeFactory extends AbstractReactFactory {
const ReactComponentType = this.componentsMap.get(
event.model.options.shape
);
// @ts-ignore
return <ReactComponentType engine={this.engine} model={event.model} />;
return (
// @ts-ignore
<ReactComponentType
key={`node-factory-${event.model.getOptions().id}`}
engine={this.engine}
model={event.model}
/>
);
}
// TODO: Generate default node instead
return <UnknownTypeWidget />;
Expand Down

0 comments on commit 598cdb6

Please sign in to comment.