Skip to content

Commit

Permalink
fix: alerts from plugins [LIBS-695] (#881)
Browse files Browse the repository at this point in the history
* fix: return result of parentAlertsAdd

* fix: yarn lock

* fix: update app-runtime to handle returned Alert
  • Loading branch information
KaiVandivier authored Oct 9, 2024
1 parent 8209788 commit 21be0d2
Show file tree
Hide file tree
Showing 4 changed files with 605 additions and 804 deletions.
2 changes: 1 addition & 1 deletion adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"test": "d2-app-scripts test"
},
"peerDependencies": {
"@dhis2/app-runtime": "^3.10.4",
"@dhis2/app-runtime": "^3.11.1",
"@dhis2/d2-i18n": "^1",
"@dhis2/ui": ">=9.11.7",
"classnames": "^2",
Expand Down
2 changes: 1 addition & 1 deletion shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@dhis2/app-adapter": "12.0.0-alpha.17",
"@dhis2/app-runtime": "^3.10.4",
"@dhis2/app-runtime": "^3.11.1",
"@dhis2/d2-i18n": "^1.1.1",
"@dhis2/pwa": "12.0.0-alpha.17",
"@dhis2/ui": "^9.11.7",
Expand Down
6 changes: 3 additions & 3 deletions shell/src/PluginLoader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => {
}

if (alertsAdd) {
setParentAlertsAdd(() => (alert, alertRef) => {
alertsAdd(alert, alertRef)
})
setParentAlertsAdd(
() => (alert, alertRef) => alertsAdd(alert, alertRef)
)
}

if (showAlertsInPlugin) {
Expand Down
Loading

0 comments on commit 21be0d2

Please sign in to comment.