diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-11-04 15:29:50 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-11-07 10:46:07 +0100 |
| commit | b73485ab73c6868d799f886196a4ad11a03d2cec (patch) | |
| tree | 9c9502c1c04b400ef7bf91363998b3e7b98895d8 /gui/src/renderer/lib | |
| parent | 40bc4e6bbd51fd78ff67e376a5fbe921cd4c4964 (diff) | |
| download | mullvadvpn-b73485ab73c6868d799f886196a4ad11a03d2cec.tar.xz mullvadvpn-b73485ab73c6868d799f886196a4ad11a03d2cec.zip | |
Save expanded state for sections in location state and restore on navigation
Diffstat (limited to 'gui/src/renderer/lib')
| -rw-r--r-- | gui/src/renderer/lib/history.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/src/renderer/lib/history.tsx b/gui/src/renderer/lib/history.tsx index e74552f786..b81aef50fe 100644 --- a/gui/src/renderer/lib/history.tsx +++ b/gui/src/renderer/lib/history.tsx @@ -194,7 +194,7 @@ export default class History { pathname: location.pathname ?? this.location.pathname, search: location.search ?? '', hash: location.hash ?? '', - state: location.state ?? { scrollPosition: [0, 0], expandedSections: [] }, + state: location.state ?? { scrollPosition: [0, 0], expandedSections: {} }, key: location.key ?? this.getRandomKey(), }; } @@ -205,7 +205,7 @@ export default class History { pathname: path, search: '', hash: '', - state: state ?? { scrollPosition: [0, 0], expandedSections: [] }, + state: state ?? { scrollPosition: [0, 0], expandedSections: {} }, key: this.getRandomKey(), }; } |
