Fix node searchbox filter removal (#881)

This commit is contained in:
Chenlei Hu
2024-09-19 11:58:29 +09:00
committed by GitHub
parent 63302a6634
commit 98de010811
4 changed files with 83 additions and 3 deletions

View File

@@ -34,7 +34,7 @@
<script setup lang="ts">
import { app } from '@/scripts/app'
import { computed, onMounted, onUnmounted, ref, watchEffect } from 'vue'
import { computed, onMounted, onUnmounted, ref, toRaw, watchEffect } from 'vue'
import NodeSearchBox from './NodeSearchBox.vue'
import Dialog from 'primevue/dialog'
import { ConnectingLink } from '@comfyorg/litegraph'
@@ -66,7 +66,9 @@ const addFilter = (filter: FilterAndValue) => {
nodeFilters.value.push(filter)
}
const removeFilter = (filter: FilterAndValue) => {
nodeFilters.value = nodeFilters.value.filter((f) => f !== filter)
nodeFilters.value = nodeFilters.value.filter(
(f) => toRaw(f) !== toRaw(filter)
)
}
const clearFilters = () => {
nodeFilters.value = []