From 2933d811189c804bd25f94f571bf77d9f7c234fe Mon Sep 17 00:00:00 2001 From: Mary Hipp Date: Fri, 7 Jul 2023 11:16:23 -0400 Subject: [PATCH] cleanup --- .../features/embedding/components/ParamEmbeddingPopover.tsx | 4 +--- .../Parameters/Core/ParamPositiveConditioning.tsx | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/invokeai/frontend/web/src/features/embedding/components/ParamEmbeddingPopover.tsx b/invokeai/frontend/web/src/features/embedding/components/ParamEmbeddingPopover.tsx index 774c67c09f..b5e96b6c92 100644 --- a/invokeai/frontend/web/src/features/embedding/components/ParamEmbeddingPopover.tsx +++ b/invokeai/frontend/web/src/features/embedding/components/ParamEmbeddingPopover.tsx @@ -16,17 +16,15 @@ import { forEach } from 'lodash-es'; import { PropsWithChildren, useCallback, useMemo, useRef } from 'react'; import { useGetTextualInversionModelsQuery } from 'services/api/endpoints/models'; import { PARAMETERS_PANEL_WIDTH } from 'theme/util/constants'; -import { useFeatureStatus } from '../../system/hooks/useFeatureStatus'; type Props = PropsWithChildren & { onSelect: (v: string) => void; isOpen: boolean; onClose: () => void; - enabled?: boolean; }; const ParamEmbeddingPopover = (props: Props) => { - const { onSelect, isOpen, onClose, children, enabled } = props; + const { onSelect, isOpen, onClose, children } = props; const { data: embeddingQueryData } = useGetTextualInversionModelsQuery(); const inputRef = useRef(null); diff --git a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamPositiveConditioning.tsx b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamPositiveConditioning.tsx index 2480d39e1a..a41be1e19c 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamPositiveConditioning.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamPositiveConditioning.tsx @@ -108,11 +108,11 @@ const ParamPositiveConditioning = () => { dispatch(clampSymmetrySteps()); dispatch(userInvoked(activeTabName)); } - if (e.key === '<') { + if (isTiEmbeddingEnabled && e.key === '<') { onOpen(); } }, - [isReady, dispatch, activeTabName, onOpen] + [isReady, dispatch, activeTabName, onOpen, isTiEmbeddingEnabled] ); const isTiEmbeddingEnabled = useFeatureStatus('tiEmbedding').isFeatureEnabled; @@ -137,9 +137,9 @@ const ParamPositiveConditioning = () => { value={prompt} placeholder={t('parameters.positivePromptPlaceholder')} onChange={handleChangePrompt} + onKeyDown={handleKeyDown} resize="vertical" minH={32} - {...(isTiEmbeddingEnabled && { onKeyDown: handleKeyDown })} />