Fixed topic message search params after navigation to next page. (#140)

Co-authored-by: Sofia Shnaidman <sshnaidman@provectus.com>
This commit is contained in:
soffest 2020-12-15 15:26:37 +03:00 committed by GitHub
parent 181ae1fe45
commit 4bd5f7d9da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ const Messages: React.FC<Props> = ({
const [selectedSeekType, setSelectedSeekType] = React.useState<SeekType>(
SeekType.OFFSET
);
const [searchOffset, setSearchOffset] = React.useState<string>('0');
const [searchOffset, setSearchOffset] = React.useState<string>();
const [selectedPartitions, setSelectedPartitions] = React.useState<Option[]>(
partitions.map((p) => ({
value: p.partition,
@ -219,12 +219,11 @@ const Messages: React.FC<Props> = ({
)
.map((p) => `${p.partition}::${p.offset}`);
setQueryParams({
fetchTopicMessages(clusterName, topicName, {
...queryParams,
seekType: SeekType.OFFSET,
seekTo,
});
fetchTopicMessages(clusterName, topicName, queryParams);
};
const filterOptions = (options: Option[], filter: any) => {