Commit 7fe5dbc
authored
fix: persist left/right sidebar open state (#231)
Replace the single STORAGE_KEY with separate LEFT_KEY and RIGHT_KEY constants and compute a defaultOpen object from localStorage for each side. Pass storageKey as an object ({ left, right }) and defaultOpen to SidebarProvider so left and right sidebars persist their expanded/collapsed state independently (any value other than 'false' is treated as open).1 parent a1c7166 commit 7fe5dbc
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
245 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
246 | 255 | | |
247 | 256 | | |
248 | 257 | | |
| |||
0 commit comments