need to use updateResource on subroute
Hi,
In cricles in Hubl, components can be embeded and you can acces it by right menu.
In my case, for resources component, I need to use route.updateResource()
to force a solid-display loading.
Whithout this, when I navigate in other sub routes, the solid-display is loaded.
This solid-display is on the default route of router.
For the moment, I use this to resolve my issue :
document.querySelector('#circles>div>nav>solid-router').addEventListener('navigate', e => {console.log(e),
document.querySelector('#circles solid-resource solid-route:first-child').updateResource() ;
});
But where is the the great issue ?
Here the sub router html :
<solid-router default-route="${idPrefix}-${uniq}-listresources" use-hash>
<solid-route use-id="${uniq}-listresources" class="d-none" name="${idPrefix}-${uniq}-listresources" active=""></solid-route>
<solid-route name="${idPrefix}-resourcedetail"></solid-route>
<solid-route name="${idPrefix}-newresource"></solid-route>
<solid-route name="${idPrefix}-newkeyword"></solid-route>
<solid-route use-id name="${idPrefix}-editresource"></solid-route>
</solid-router>
Here the solid-display html in section view :
<section data-view="${idPrefix}-${uniq}-listresources" id="${uniq}-listresources" class="listresources">
<!-- some html --->
<solid-display
class="segment full children children-third sm-children-full children-margin-bottom-medium sm-children-margin-bottom-xsmall children-padding-right-large children-padding-left-large sm-children-padding-none sm-whitespace-normal masonry counter pagination"
data-src="${sourceUrl}"
extra-context="${uniq}-resource-context"
filtered-by="${uniq}-solid-resource-search"
fields="segment1(img, name, type, shortdesc, document, link, keywords)"
widget-img ="solid-display-img"
widget-type="res-display-type"
widget-document="res-display-link-document"
widget-link="res-display-link-resource"
class-segment1="segment hover bg-color-white shadow full text-top text-center whitespace-normal padding-bottom-medium"
class-img="event-children-bg-color-primary"
class-name="segment block whitespace-normal text-uppercase text-semibold text-color-heading text-xxlarge text-letter-spacing-larger margin-medium margin-bottom-xsmall"
class-type="text-uppercase tag color-secondary reversed"
class-shortdesc="segment block whitespace-normal margin-small"
class-keywords="segment block whitespace-normal margin-large"
class-links="segment block whitespace-normal margin-large"
multiple-keywords
multiple-keywords-fields="name"
paginate-by="9"
next="${idPrefix}-resourcedetail"
loader-id="${uniq}-loading-resources"
></solid-display>