1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 22:33:35 +00:00

[PM-21005] Clear Add/Edit form cache when browser loses focus (#14634)

This commit is contained in:
Nick Krantz
2025-05-21 08:00:49 -05:00
committed by GitHub
parent ae35cb4e65
commit 1c4d851046
7 changed files with 73 additions and 15 deletions

View File

@@ -23,6 +23,12 @@ type BaseCacheOptions<T> = {
* Optional flag to persist the cached value between navigation events.
*/
persistNavigation?: boolean;
/**
* When set, the cached value will be cleared when the user changes tabs.
* @optional
*/
clearOnTabChange?: true;
} & (T extends JsonValue ? Deserializer<T> : Required<Deserializer<T>>);
export type SignalCacheOptions<T> = BaseCacheOptions<T> & {