Add dynamic loading of userLayout from localStorage

This commit is contained in:
Pieter Vander Vennet 2020-08-25 14:28:43 +02:00
parent b4f95e5408
commit 58d6903ec5
3 changed files with 16 additions and 8 deletions

View file

@ -3,10 +3,7 @@ import {UIEventSource} from "../UIEventSource";
export class LocalStorageSource {
static Get(key: string, defaultValue: string = undefined): UIEventSource<string> {
try {
const saved = localStorage.getItem(key);
const source = new UIEventSource<string>(saved ?? defaultValue);