Commit da5bcf26 authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: fix extraContext required

parent 8cef1445
Pipeline #3727 passed with stage
in 28 seconds
......@@ -81,13 +81,16 @@ class SIBNotifications extends SIBTemplateElement {
}
_onClickNotification(target) {
let extraContext = {}
if (this.props.extraContext) {
const context = { ...target.context, ...JSON.parse(this.props.extraContext) }
store.get(target.resource.object, context).then((resource) => {
window.dispatchEvent(new CustomEvent('requestNavigation', { detail: { resource: resource } }))
this.querySelector('details').removeAttribute("open")
})
extraContext = JSON.parse(this.props.extraContext)
}
const context = { ...target.context, ...extraContext }
store.get(target.resource.object, context).then((resource) => {
if (!resource) return;
window.dispatchEvent(new CustomEvent('requestNavigation', { detail: { resource: resource } }))
this.querySelector('details').removeAttribute("open")
})
}
_onClickUnreadButton(target) {
this._onReadResource(target.closest('sib-display').resource['@id'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment