✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
add searchNode action
AykutSarac2d8dc7e0d1ca
diff --git a/src/reducer/reducer.ts b/src/reducer/reducer.tsindex 00cbbd80..89ee146b 100644--- a/src/reducer/reducer.ts+++ b/src/reducer/reducer.ts@@ -12,6 +12,7 @@ export enum ConfigActionType {ZOOM_OUT,CENTER_VIEW,SET_JSON,+ SET_SEARCH_NODE,}export type ReducerAction = {@@ -27,6 +28,15 @@ export const useConfigReducer: React.Reducer<AppConfig, ReducerAction> = (case ConfigActionType.SET_CONFIG:return { ...state, settings: action.payload };+ case ConfigActionType.SET_SEARCH_NODE:+ return {+ ...state,+ settings: {+ ...state.settings,+ searchNode: action.payload,+ },+ };+case ConfigActionType.CENTER_VIEW:return {...state,diff --git a/src/typings/global.ts b/src/typings/global.tsindex f34e6966..4ab7f84e 100644--- a/src/typings/global.ts+++ b/src/typings/global.ts@@ -7,4 +7,5 @@ export interface StorageConfig {hideEditor: boolean;zoomScale: number;transform: number;+ searchNode: string;}