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