Fixed Selected partitions label (#2042)
* Fixed Selected partitions label * Console logs removed
This commit is contained in:
parent
4f1078aabb
commit
996e127a02
3 changed files with 5 additions and 5 deletions
|
@ -181,7 +181,7 @@ const Filters: React.FC<FiltersProps> = ({
|
|||
partitions.map((partition: Partition) => {
|
||||
return {
|
||||
value: partition.partition,
|
||||
label: String(partition.partition),
|
||||
label: `Partition #${partition.partition.toString()}`,
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
|
@ -53,7 +53,7 @@ export const getSelectedPartitionsFromSeekToParam = (
|
|||
if (selectedPartitionIds?.includes(partition)) {
|
||||
return {
|
||||
value: partition,
|
||||
label: partition.toString(),
|
||||
label: `Partition #${partition.toString()}`,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,6 @@ export const getSelectedPartitionsFromSeekToParam = (
|
|||
|
||||
return partitions.map(({ partition }) => ({
|
||||
value: partition,
|
||||
label: partition.toString(),
|
||||
label: `Partition #${partition.toString()}`,
|
||||
}));
|
||||
};
|
||||
|
|
|
@ -101,7 +101,7 @@ describe('utils', () => {
|
|||
it('returns parsed partition from params when partition list includes selected partition', () => {
|
||||
searchParams.set('seekTo', '42::0');
|
||||
expect(getSelectedPartitionsFromSeekToParam(searchParams, part)).toEqual([
|
||||
{ label: '42', value: 42 },
|
||||
{ label: 'Partition #42', value: 42 },
|
||||
]);
|
||||
});
|
||||
it('returns parsed partition from params when partition list NOT includes selected partition', () => {
|
||||
|
@ -113,7 +113,7 @@ describe('utils', () => {
|
|||
it('returns partitions when param "seekTo" is not defined', () => {
|
||||
searchParams.delete('seekTo');
|
||||
expect(getSelectedPartitionsFromSeekToParam(searchParams, part)).toEqual([
|
||||
{ label: '42', value: 42 },
|
||||
{ label: 'Partition #42', value: 42 },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue