Skip to content

Commit

Permalink
Fixes a bug when downloading messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jvorcak committed Feb 3, 2025
1 parent 3cffd23 commit 3c0710f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions frontend/src/components/pages/topics/Tab.Messages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export class TopicMessageView extends Component<TopicMessageViewProps> {

currentSearchRun: string | null = null;

@observable downloadMessages: TopicMessage[] | null;
@observable downloadMessages: TopicMessage[] | null = null;
@observable expandedKeys: React.Key[] = [];

constructor(props: TopicMessageViewProps) {
Expand Down Expand Up @@ -961,7 +961,13 @@ export class TopicMessageView extends Component<TopicMessageViewProps> {
>
Copy Epoch Timestamp
</MenuItem>
<MenuItem onClick={() => (this.downloadMessages = [original])}>Save to File</MenuItem>
<MenuItem
onClick={() => {
this.downloadMessages = [original];
}}
>
Save to File
</MenuItem>
</MenuList>
</Menu>
);
Expand Down Expand Up @@ -998,7 +1004,9 @@ export class TopicMessageView extends Component<TopicMessageViewProps> {
loadLargeMessage={() =>
this.loadLargeMessage(this.props.topic.topicName, original.partitionID, original.offset)
}
onDownloadRecord={() => (this.downloadMessages = [original])}
onDownloadRecord={() => {
this.downloadMessages = [original];
}}
onCopyKey={onCopyKey}
onCopyValue={onCopyValue}
/>
Expand Down

0 comments on commit 3c0710f

Please sign in to comment.