Show (count) as text
This commit is contained in:
parent
e9e1378083
commit
7457fc6eeb
|
|
@ -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>}
|
||||
|
|
|
|||
Loading…
Reference in a new issue