fix(dees-appui): substitute route params into URL hash when navigating
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-03-10 - 3.45.1 - fix(dees-appui)
|
||||||
|
substitute route params into URL hash when navigating
|
||||||
|
|
||||||
|
- Replaces :param placeholders in view.route with provided params before updating the URL hash.
|
||||||
|
- Ensures window.history.pushState is called with the resolved route so URLs do not contain literal parameter tokens.
|
||||||
|
|
||||||
## 2026-03-10 - 3.45.0 - feat(dees-form)
|
## 2026-03-10 - 3.45.0 - feat(dees-form)
|
||||||
register new input components (tags, list, wysiwyg, richtext) and emit change notification for richtext updates
|
register new input components (tags, list, wysiwyg, richtext) and emit change notification for richtext updates
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '3.45.0',
|
version: '3.45.1',
|
||||||
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -875,8 +875,13 @@ export class DeesAppui extends DeesElement {
|
|||||||
try {
|
try {
|
||||||
await this.loadView(view, params);
|
await this.loadView(view, params);
|
||||||
|
|
||||||
// Update URL hash
|
// Update URL hash (substitute params into route pattern)
|
||||||
const route = view.route || viewId;
|
let route = view.route || viewId;
|
||||||
|
if (params) {
|
||||||
|
for (const [key, val] of Object.entries(params)) {
|
||||||
|
route = route.replace(`:${key}`, val);
|
||||||
|
}
|
||||||
|
}
|
||||||
const newHash = `#${route}`;
|
const newHash = `#${route}`;
|
||||||
if (window.location.hash !== newHash) {
|
if (window.location.hash !== newHash) {
|
||||||
window.history.pushState({ viewId }, '', newHash);
|
window.history.pushState({ viewId }, '', newHash);
|
||||||
|
|||||||
Reference in New Issue
Block a user