Show (count) as text
This commit is contained in:
parent
e9e1378083
commit
7457fc6eeb
|
|
@ -62,8 +62,13 @@ 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>}
|
||||
{rightToolbar && <div style={{ flex: 'none', display: 'flex', alignItems: 'center' }}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue