mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-30 20:28:20 +00:00
Save filter fix (#2022)
This commit is contained in:
parent
d1bd356f64
commit
7552aca955
@ -72,6 +72,8 @@
|
|||||||
|
|
||||||
function saveFilters (filters: Filter[]) {
|
function saveFilters (filters: Filter[]) {
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
|
loc.fragment = undefined
|
||||||
|
loc.query = undefined
|
||||||
const key = 'filter' + locationToUrl(loc)
|
const key = 'filter' + locationToUrl(loc)
|
||||||
if (filters.length > 0) {
|
if (filters.length > 0) {
|
||||||
localStorage.setItem(key, JSON.stringify(filters))
|
localStorage.setItem(key, JSON.stringify(filters))
|
||||||
@ -82,6 +84,8 @@
|
|||||||
|
|
||||||
function load (_class: Ref<Class<Doc>>) {
|
function load (_class: Ref<Class<Doc>>) {
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
|
loc.fragment = undefined
|
||||||
|
loc.query = undefined
|
||||||
const key = 'filter' + locationToUrl(loc)
|
const key = 'filter' + locationToUrl(loc)
|
||||||
const saved = localStorage.getItem(key)
|
const saved = localStorage.getItem(key)
|
||||||
filters.map((p) => p.onRemove?.())
|
filters.map((p) => p.onRemove?.())
|
||||||
|
Loading…
Reference in New Issue
Block a user