mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 05:00:03 +00:00
Fix node searchbox filter removal (#881)
This commit is contained in:
@@ -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 = []
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
<template>
|
||||
<div class="_content">
|
||||
<SelectButton
|
||||
class="filter-type-select"
|
||||
v-model="selectedFilter"
|
||||
:options="filters"
|
||||
:allowEmpty="false"
|
||||
optionLabel="name"
|
||||
@change="updateSelectedFilterValue"
|
||||
/>
|
||||
<Select v-model="selectedFilterValue" :options="filterValues" filter />
|
||||
<Select
|
||||
class="filter-value-select"
|
||||
v-model="selectedFilterValue"
|
||||
:options="filterValues"
|
||||
filter
|
||||
/>
|
||||
</div>
|
||||
<div class="_footer">
|
||||
<Button type="button" :label="$t('add')" @click="submit"></Button>
|
||||
|
||||
Reference in New Issue
Block a user