Skip to content
Snippets Groups Projects
Commit 9067fc46 authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier
Browse files
parent 4e5010d7
No related branches found
Tags v1.3.31
No related merge requests found
Pipeline #17382 passed with stage
in 51 seconds
......@@ -26,15 +26,28 @@ importCore().then(core => {
args: () => [this.dataSrc]
})
firstUpdated() {
document.addEventListener('navigate', (e) => {
console.log(e);
if(e.detail.route == `${this.uniq}-products-redirector` && e.explicitOriginalTarget == document.querySelector(`[default-route="${this.uniq}-producers-list"]`)) {
window.dispatchEvent(
new CustomEvent('requestNavigation', {
detail: {
route: `${this.uniq}-products-list`
}
}),
);
}
});
}
render() {
if(!this.dataSrc || !this.uniq) return nothing;
return this._getResource.render({
pending: () => html`<div class="progress"><div class="indeterminate"></div></div>`,
complete: (resource) => {
if(resource) {
console.log(resource);
window.dispatchEvent(
new CustomEvent('requestNavigation', {
detail: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment