chore: Fix select warning when panes docked on right (#35404)

This commit is contained in:
Chris 2025-03-31 15:16:41 +02:00 committed by GitHub
parent fffd87af1d
commit 62a8d4e01f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ export const TabbedPane: React.FunctionComponent<{
]}
</div>}
{mode === 'select' && <div style={{ flex: 'auto', display: 'flex', height: '100%', overflow: 'hidden' }} role='tablist'>
<select style={{ width: '100%', background: 'none', cursor: 'pointer' }} onChange={e => {
<select style={{ width: '100%', background: 'none', cursor: 'pointer' }} value={selectedTab} onChange={e => {
setSelectedTab?.(tabs[e.currentTarget.selectedIndex].id);
}}>
{tabs.map(tab => {
@ -72,7 +72,7 @@ export const TabbedPane: React.FunctionComponent<{
suffix = ` (${tab.count})`;
if (tab.errorCount)
suffix = ` (${tab.errorCount})`;
return <option key={tab.id} value={tab.id} selected={tab.id === selectedTab} role='tab' aria-controls={`${id}-${tab.id}`}>{tab.title}{suffix}</option>;
return <option key={tab.id} value={tab.id} role='tab' aria-controls={`${id}-${tab.id}`}>{tab.title}{suffix}</option>;
})}
</select>
</div>}