fix: disabled form item in the settings can still be operated via keyboard (#4605)

This commit is contained in:
electron97 2023-10-16 10:44:11 +05:30 committed by GitHub
parent 710a2f2c97
commit c1d386d932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { Button } from '@toeverything/components/button';
import { Tooltip } from '@toeverything/components/tooltip';
import { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-workspace-name';
import { noop } from 'foxact/noop';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { toast } from '../../../utils';
@ -100,7 +101,7 @@ const FakePublishPanelAffine = (_props: FakePublishPanelAffineProps) => {
<Tooltip content={t['com.affine.settings.workspace.publish-tooltip']()}>
<div className={style.fakeWrapper}>
<SettingRow name={t['Publish']()} desc={t['Unpublished hint']()}>
<Switch checked={false} />
<Switch checked={false} onChange={noop} />
</SettingRow>
</div>
</Tooltip>