Commit b5a26094 authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: fix navigate to rdf_type

parent 8e7c54e4
Pipeline #3700 passed with stage
in 28 seconds
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
extra-context='{"doap": "http://usefulinc.com/ns/doap#"}' extra-context='{"doap": "http://usefulinc.com/ns/doap#"}'
></sib-notifications> ></sib-notifications>
<sib-router default-route="home"> <sib-router default-route="home" route-prefix="examples/notifications-routing.html">
<sib-route name="home"></sib-route> <sib-route name="home"></sib-route>
<sib-route name="project" rdf-type="doap:project"></sib-route> <sib-route name="project" rdf-type="doap:project" use-id></sib-route>
</sib-router> </sib-router>
<div id="home"> <div id="home">
......
...@@ -81,8 +81,9 @@ class SIBNotifications extends SIBTemplateElement { ...@@ -81,8 +81,9 @@ class SIBNotifications extends SIBTemplateElement {
} }
_onClickNotification(target) { _onClickNotification(target) {
if(this.props.extraContext){ if (this.props.extraContext) {
store.get(target.resource.object, JSON.parse(this.props.extraContext)).then((resource) => { 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 } })) window.dispatchEvent(new CustomEvent('requestNavigation', { detail: { resource: resource } }))
this.querySelector('details').removeAttribute("open") this.querySelector('details').removeAttribute("open")
}) })
......
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