Skip to content

Commit

Permalink
fix: ensure table data reset successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
stone-lyl committed Sep 27, 2024
1 parent 7f2222c commit d458831
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class WorkspaceSocketClient implements WorkspaceApiClient {
private maxReconnectTries = 100;
private reconnectTimeoutMs = 1000;
private updateEdgeCounts?: ClientRunParams['updateEdgeCounts'];
private observers: ServerClientObservationConfig | undefined;
private observers: ServerClientObservationConfig|undefined;

constructor() {
this.socket$ = webSocket({
Expand Down Expand Up @@ -47,6 +47,7 @@ export class WorkspaceSocketClient implements WorkspaceApiClient {
filter(data => data.type === 'NotifyObservers'),
clientBuffer()
).subscribe((data) => {
console.log('workspaceSocketClient: NotifyObservers', data);
this?.observers?.onDataChange(
data.items,
data.inputObservers,
Expand All @@ -65,6 +66,10 @@ export class WorkspaceSocketClient implements WorkspaceApiClient {
inputObservers: observers?.inputObservers || [],
};

eventManager.emit({
type: DataStoryEvents.RUN_START
});

this.socketSendMsg(message);
}

Expand Down
6 changes: 5 additions & 1 deletion packages/vscode-extension/src/app/VsCodeClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export class VsCodeClient implements WorkspaceApiClient {
inputObservers: observers?.inputObservers || [],
};

eventManager.emit({
type: DataStoryEvents.RUN_START
});

this.sendMessage(message);
}

Expand Down Expand Up @@ -143,4 +147,4 @@ export async function waitForResponse(params: any): Promise<any> {
}
}, 10000);
});
}
}

0 comments on commit d458831

Please sign in to comment.