Skip to content

Commit

Permalink
(fix) Fix import map overrides panel (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen authored Sep 16, 2022
1 parent d0e5988 commit c69f1d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useRef, useEffect } from "react";
import styles from "./import-map.styles.css";

export default function ImportMap(props: ImportMapProps) {
export default function ImportMap({ toggleOverridden }: ImportMapProps) {
const importMapListRef = useRef<HTMLElement>(null);

useEffect(() => {
Expand All @@ -16,7 +16,7 @@ export default function ImportMap(props: ImportMapProps) {
);

function handleImportMapChange(evt) {
props.toggleOverridden(importMapOverridden());
toggleOverridden(importMapOverridden());
}
}, [importMapListRef.current]);

Expand Down
4 changes: 4 additions & 0 deletions packages/shell/esm-app-shell/src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
>
<script type="systemjs-importmap" src="<%= openmrsImportmapUrl %>"></script>
<% } %>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/import-map-overrides/dist/import-map-overrides.js"
></script>
</head>
<body>
<%= htmlWebpackPlugin.tags.bodyTags %>
Expand Down
1 change: 0 additions & 1 deletion packages/shell/esm-app-shell/src/run.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "import-map-overrides";
import "systemjs/dist/system";
import "systemjs/dist/extras/amd";
import "systemjs/dist/extras/named-exports";
Expand Down

0 comments on commit c69f1d7

Please sign in to comment.