mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
Fix object filter (#3011)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
d5f1668532
commit
8a45bd0e2f
@ -112,7 +112,8 @@
|
||||
}
|
||||
if (values.length !== targets.size) {
|
||||
const oldSize = filter.value.length
|
||||
filter.value = filter.value.filter((p) => !targets.has(p._id))
|
||||
const set = new Set(values.map((p) => p?._id))
|
||||
filter.value = filter.value.filter((p) => set.has(p))
|
||||
const removed = oldSize - (filter.value.length ?? 0)
|
||||
if (removed > 0) {
|
||||
onChange(filter)
|
||||
|
Loading…
Reference in New Issue
Block a user