fix: column view navigation and duplicate app instance
- Fix duplicate tsview-app rendering by checking if element already exists in HTML - Fix column navigation to expand horizontally instead of resetting - Remove navigate event dispatch from column folder selection to preserve column state
This commit is contained in:
@@ -13,9 +13,11 @@ const initApp = async () => {
|
||||
// Wait for custom elements to be defined
|
||||
await customElements.whenDefined('tsview-app');
|
||||
|
||||
// Create and mount the app
|
||||
const app = document.createElement('tsview-app');
|
||||
document.body.appendChild(app);
|
||||
// Only create the app element if it doesn't already exist in HTML
|
||||
if (!document.querySelector('tsview-app')) {
|
||||
const app = document.createElement('tsview-app');
|
||||
document.body.appendChild(app);
|
||||
}
|
||||
|
||||
console.log('TsView UI ready');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user