fix: console selectedKeys warning

This commit is contained in:
ezequielnick 2025-08-05 19:20:32 +08:00
parent f00600a83c
commit d6f0d30f9a

View File

@ -207,7 +207,11 @@ const Mihomo: React.FC = () => {
className="w-[100px]"
size="sm"
aria-label={t('mihomo.selectCoreVersion')}
selectedKeys={new Set([core])}
selectedKeys={new Set([
enableSmartCore
? 'mihomo-smart'
: (core === 'mihomo-smart' ? 'mihomo' : core)
])}
disallowEmptySelection={true}
onSelectionChange={async (v) => {
handleConfigChangeWithRestart('core', v.currentKey as 'mihomo' | 'mihomo-alpha' | 'mihomo-smart')