Show (count) as text

This commit is contained in:
Yury Semikhatsky 2024-08-01 15:19:16 -07:00
parent e9e1378083
commit 7457fc6eeb

View file

@ -62,7 +62,12 @@ export const TabbedPane: React.FunctionComponent<{
setSelectedTab(tabs[e.currentTarget.selectedIndex].id);
}}>
{tabs.map(tab => {
return <option value={tab.id} selected={tab.id === selectedTab}>{tab.title}</option>;
let suffix = '';
if (tab.count)
suffix = ` (${tab.count})`;
if (tab.errorCount)
suffix = ` (${tab.errorCount})`;
return <option value={tab.id} selected={tab.id === selectedTab}>{tab.title}{suffix}</option>;
})}
</select>
</div>}