From c3beb029e5af288f90d383f595bcbe6f1ed1926e Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 24 Nov 2025 15:19:35 +0100 Subject: [PATCH] Refactor FormattedDropdown and enhance BranchView functionality - Updated the FormattedDropdown component to use normal document flow for the dropdown list, ensuring visibility when opened. - Enhanced the createBranch method in BranchView to automatically select the most recently created branch after a new branch is added, improving user experience. --- frontend/src/components/form/FormattedDropdown.vue | 6 +++--- frontend/src/views/falukant/BranchView.vue | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/form/FormattedDropdown.vue b/frontend/src/components/form/FormattedDropdown.vue index 8369ff9..f542df2 100644 --- a/frontend/src/components/form/FormattedDropdown.vue +++ b/frontend/src/components/form/FormattedDropdown.vue @@ -98,9 +98,9 @@ export default { } .dropdown-list { - position: absolute; - top: 100%; - left: 0; + /* Statt absolut positioniert (wurde durch übergeordnete Container mit + overflow:hidden abgeschnitten) jetzt im normalen Dokumentfluss, damit + die Liste zuverlässig sichtbar ist, sobald isOpen=true. */ background: white; border: 1px solid #ccc; border-radius: 4px; diff --git a/frontend/src/views/falukant/BranchView.vue b/frontend/src/views/falukant/BranchView.vue index d86f0b4..106f236 100644 --- a/frontend/src/views/falukant/BranchView.vue +++ b/frontend/src/views/falukant/BranchView.vue @@ -148,6 +148,17 @@ export default { async createBranch() { await this.loadBranches(); + // Nach dem Anlegen eines neuen Branches automatisch den + // zuletzt/neu erstellten Branch auswählen. + if (this.branches.length > 0) { + const newest = this.branches.reduce((acc, b) => + !acc || b.id > acc.id ? b : acc, + null + ); + if (newest) { + await this.onBranchSelected(newest); + } + } }, upgradeBranch() {