Update setFilterEdge references in code
This commit is contained in:
parent
6e01053f6f
commit
6e8c00ca75
7 changed files with 12 additions and 10 deletions
|
|
@ -71,7 +71,7 @@ export default function ParameterComponent({
|
||||||
|
|
||||||
const groupedEdge = useRef(null);
|
const groupedEdge = useRef(null);
|
||||||
|
|
||||||
const setFilterEdge = useTypesStore((state) => state.setFilterEdge);
|
const setFilterEdge = useFlowStore((state) => state.setFilterEdge);
|
||||||
|
|
||||||
let disabled =
|
let disabled =
|
||||||
edges.some(
|
edges.some(
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export default function Page({
|
||||||
);
|
);
|
||||||
const types = useTypesStore((state) => state.types);
|
const types = useTypesStore((state) => state.types);
|
||||||
const templates = useTypesStore((state) => state.templates);
|
const templates = useTypesStore((state) => state.templates);
|
||||||
const setFilterEdge = useTypesStore((state) => state.setFilterEdge);
|
const setFilterEdge = useFlowStore((state) => state.setFilterEdge);
|
||||||
const reactFlowWrapper = useRef<HTMLDivElement>(null);
|
const reactFlowWrapper = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
const reactFlowInstance = useFlowStore((state) => state.reactFlowInstance);
|
const reactFlowInstance = useFlowStore((state) => state.reactFlowInstance);
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ import SidebarDraggableComponent from "./sideBarDraggableComponent";
|
||||||
export default function ExtraSidebar(): JSX.Element {
|
export default function ExtraSidebar(): JSX.Element {
|
||||||
const data = useTypesStore((state) => state.data);
|
const data = useTypesStore((state) => state.data);
|
||||||
const templates = useTypesStore((state) => state.templates);
|
const templates = useTypesStore((state) => state.templates);
|
||||||
const getFilterEdge = useTypesStore((state) => state.getFilterEdge);
|
const getFilterEdge = useFlowStore((state) => state.getFilterEdge);
|
||||||
const setFilterEdge = useTypesStore((state) => state.setFilterEdge);
|
const setFilterEdge = useFlowStore((state) => state.setFilterEdge);
|
||||||
const uploadFlow = useFlowsManagerStore((state) => state.uploadFlow);
|
const uploadFlow = useFlowsManagerStore((state) => state.uploadFlow);
|
||||||
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
||||||
const hasStore = useStoreStore((state) => state.hasStore);
|
const hasStore = useStoreStore((state) => state.hasStore);
|
||||||
|
|
|
||||||
|
|
@ -257,8 +257,13 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
||||||
flowState: undefined,
|
flowState: undefined,
|
||||||
sseData: {},
|
sseData: {},
|
||||||
isBuilt: false,
|
isBuilt: false,
|
||||||
|
getFilterEdge: [],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
setFilterEdge: (newState) => {
|
||||||
|
set({ getFilterEdge: newState });
|
||||||
|
},
|
||||||
|
getFilterEdge: []
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export default useFlowStore;
|
export default useFlowStore;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ export const useTypesStore = create<TypesStoreType>((set, get) => ({
|
||||||
types: {},
|
types: {},
|
||||||
templates: {},
|
templates: {},
|
||||||
data: {},
|
data: {},
|
||||||
getFilterEdge: [],
|
|
||||||
getTypes: () => {
|
getTypes: () => {
|
||||||
return new Promise<void>(async (resolve, reject) => {
|
return new Promise<void>(async (resolve, reject) => {
|
||||||
getAll()
|
getAll()
|
||||||
|
|
@ -44,7 +43,5 @@ export const useTypesStore = create<TypesStoreType>((set, get) => ({
|
||||||
let newChange = typeof change === "function" ? change(get().data) : change;
|
let newChange = typeof change === "function" ? change(get().data) : change;
|
||||||
set({ data: newChange });
|
set({ data: newChange });
|
||||||
},
|
},
|
||||||
setFilterEdge: (newState) => {
|
|
||||||
set({ getFilterEdge: newState });
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
|
|
@ -50,4 +50,6 @@ export type FlowStoreType = {
|
||||||
isBuilt: boolean;
|
isBuilt: boolean;
|
||||||
setIsBuilt: (isBuilt: boolean) => void;
|
setIsBuilt: (isBuilt: boolean) => void;
|
||||||
cleanFlow: () => void;
|
cleanFlow: () => void;
|
||||||
|
setFilterEdge: (newState) => void;
|
||||||
|
getFilterEdge: any[];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,4 @@ export type TypesStoreType = {
|
||||||
data: APIDataType;
|
data: APIDataType;
|
||||||
setData: (newState: {}) => void;
|
setData: (newState: {}) => void;
|
||||||
getTypes: () => Promise<void>;
|
getTypes: () => Promise<void>;
|
||||||
setFilterEdge: (newState) => void;
|
|
||||||
getFilterEdge: any[];
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue