fix: hide find in page command in cmdk (#7413)
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
import { registerAffineCommand } from '@affine/core/commands';
|
import {
|
||||||
|
PreconditionStrategy,
|
||||||
|
registerAffineCommand,
|
||||||
|
} from '@affine/core/commands';
|
||||||
import { FindInPageService } from '@affine/core/modules/find-in-page/services/find-in-page';
|
import { FindInPageService } from '@affine/core/modules/find-in-page/services/find-in-page';
|
||||||
import { useService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
@@ -20,6 +23,7 @@ export function useRegisterFindInPageCommands() {
|
|||||||
const unsubs: Array<() => void> = [];
|
const unsubs: Array<() => void> = [];
|
||||||
unsubs.push(
|
unsubs.push(
|
||||||
registerAffineCommand({
|
registerAffineCommand({
|
||||||
|
preconditionStrategy: PreconditionStrategy.Never,
|
||||||
id: `editor:find-in-page`,
|
id: `editor:find-in-page`,
|
||||||
keyBinding: {
|
keyBinding: {
|
||||||
binding: '$mod+f',
|
binding: '$mod+f',
|
||||||
|
|||||||
Reference in New Issue
Block a user