mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-04 20:48:13 +08:00
Fix inability to click node in catalog, a Svelte 5 regression
Closes #3693
This commit is contained in:
@@ -21,14 +21,15 @@
|
|||||||
let nodeSearchInput: TextInput | undefined = undefined;
|
let nodeSearchInput: TextInput | undefined = undefined;
|
||||||
let searchTerm = initialSearchTerm;
|
let searchTerm = initialSearchTerm;
|
||||||
|
|
||||||
$: nodeCategories = buildNodeCategories($nodeGraph.nodeTypes, searchTerm);
|
$: nodeCategories = buildNodeCategories(searchTerm);
|
||||||
|
|
||||||
type NodeCategoryDetails = {
|
type NodeCategoryDetails = {
|
||||||
nodes: FrontendNodeType[];
|
nodes: FrontendNodeType[];
|
||||||
open: boolean;
|
open: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
function buildNodeCategories(nodeTypes: FrontendNodeType[], searchTerm: string): [string, NodeCategoryDetails][] {
|
function buildNodeCategories(searchTerm: string): [string, NodeCategoryDetails][] {
|
||||||
|
const nodeTypes = $nodeGraph.nodeTypes;
|
||||||
const categories = new SvelteMap<string, NodeCategoryDetails>();
|
const categories = new SvelteMap<string, NodeCategoryDetails>();
|
||||||
const isTypeSearch = searchTerm.toLowerCase().startsWith("type:");
|
const isTypeSearch = searchTerm.toLowerCase().startsWith("type:");
|
||||||
let typeSearchTerm = "";
|
let typeSearchTerm = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user