Skip to content

Commit 96293a9

Browse files
committed
fix: Preserve tab when unpinning
1 parent 72d9624 commit 96293a9

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

panel/src/components/Views/Preview/PreviewView.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,17 @@ export const Preview = {
189189
},
190190
/**
191191
* Reloads the preview view for the current ID
192+
* but preserves the tab selection
192193
*/
193194
reload() {
194-
this.onTreeNavigate({ id: this.id }, true);
195+
let url = this.$panel.view.path;
196+
const query = new URLSearchParams(window.location.search);
197+
198+
if (query.has("tab") === true) {
199+
url += "?tab=" + query.get("tab");
200+
}
201+
202+
this.$panel.view.open(url);
195203
},
196204
togglePin() {
197205
this.isPinned = !this.isPinned;

0 commit comments

Comments
 (0)