mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-24 12:29:37 +00:00
Change Special filter fix (#1990)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
30a9186eab
commit
03eec41a03
@ -59,6 +59,13 @@
|
||||
)
|
||||
}
|
||||
|
||||
$: clear(_class)
|
||||
|
||||
function clear (_class: Ref<Class<Doc>>) {
|
||||
filters.map((p) => p.onRemove?.())
|
||||
filters = []
|
||||
}
|
||||
|
||||
function remove (i: number) {
|
||||
filters[i]?.onRemove?.()
|
||||
filters.splice(i, 1)
|
||||
|
@ -22,6 +22,7 @@
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
import task from '@anticrm/task'
|
||||
import type { State } from '@anticrm/task'
|
||||
import { onDestroy } from 'svelte'
|
||||
|
||||
export let _class: Ref<Class<Doc>>
|
||||
export let filter: Filter
|
||||
@ -57,6 +58,10 @@
|
||||
filter = filter
|
||||
dispatch('change')
|
||||
}
|
||||
|
||||
onDestroy(() => {
|
||||
filter.onRemove?.()
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="filter-section">
|
||||
|
Loading…
Reference in New Issue
Block a user