Refactor useFlowStore to update build status on build start

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-20 20:23:22 -03:00
commit 949cc83283

View file

@ -539,6 +539,7 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
},
onBuildStart: (elementList) => {
const idList = elementList
// reference is the id of the vertex or the id of the parent in a group node
.map((element) => element.reference)
.filter(Boolean) as string[];
useFlowStore.getState().updateBuildStatus(idList, BuildStatus.BUILDING);