Skip to content

Commit 9855049

Browse files
committed
getByParentComponentId of CCConnectionStore
1 parent 38a544d commit 9855049

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/store/connection.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ export class CCConnectionStore extends EventEmitter<CCConnectionStoreEvents> {
117117
.map((connection) => connection.id);
118118
}
119119

120+
getManyByParentComponentId(parentComponentId: CCComponentId): CCConnection[] {
121+
return [...this.#connections.values()].filter(
122+
(connection) => connection.parentComponentId === parentComponentId
123+
);
124+
}
125+
120126
/**
121127
* Get connections by id of node and pin
122128
* @param nodeId id of node

0 commit comments

Comments
 (0)