mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 10:12:11 +00:00
Enable category-based narrowing and reset to default on search clear (#2071)
Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
@@ -18,6 +18,15 @@ import type { ComfyExtension } from '@/types/comfy'
|
||||
import { buildTree } from '@/utils/treeUtil'
|
||||
import { CORE_SETTINGS } from '@/constants/coreSettings'
|
||||
|
||||
export const getSettingInfo = (setting: SettingParams) => {
|
||||
const parts = setting.category || setting.id.split('.')
|
||||
return {
|
||||
category: parts[0],
|
||||
subCategory: parts[1],
|
||||
name: parts.slice(2).join('.')
|
||||
}
|
||||
}
|
||||
|
||||
export interface SettingTreeNode extends TreeNode {
|
||||
data?: SettingParams
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user