mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
cleanup
This commit is contained in:
parent
6eb4c1ccb6
commit
8566c1c7ff
@ -51,7 +51,7 @@ export const ParamPositivePrompt = memo(() => {
|
|||||||
value={prompt}
|
value={prompt}
|
||||||
placeholder={t('parameters.positivePromptPlaceholder')}
|
placeholder={t('parameters.positivePromptPlaceholder')}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
minH={32}
|
minH={28}
|
||||||
onKeyDown={onKeyDown}
|
onKeyDown={onKeyDown}
|
||||||
variant="darkFilled"
|
variant="darkFilled"
|
||||||
/>
|
/>
|
||||||
|
@ -22,7 +22,6 @@ export const usePrompt = ({ prompt, textareaRef, onChange: _onChange }: UseInser
|
|||||||
|
|
||||||
const insertTrigger = useCallback(
|
const insertTrigger = useCallback(
|
||||||
(v: string) => {
|
(v: string) => {
|
||||||
console.log({ textareaRef })
|
|
||||||
if (!textareaRef.current) {
|
if (!textareaRef.current) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -42,7 +41,6 @@ export const usePrompt = ({ prompt, textareaRef, onChange: _onChange }: UseInser
|
|||||||
const finalCaretPos = newPrompt.length;
|
const finalCaretPos = newPrompt.length;
|
||||||
|
|
||||||
newPrompt += prompt.slice(caret);
|
newPrompt += prompt.slice(caret);
|
||||||
console.log({ newPrompt })
|
|
||||||
|
|
||||||
// must flush dom updates else selection gets reset
|
// must flush dom updates else selection gets reset
|
||||||
flushSync(() => {
|
flushSync(() => {
|
||||||
@ -58,8 +56,6 @@ export const usePrompt = ({ prompt, textareaRef, onChange: _onChange }: UseInser
|
|||||||
|
|
||||||
|
|
||||||
const onFocus = useCallback(() => {
|
const onFocus = useCallback(() => {
|
||||||
console.log("focus")
|
|
||||||
console.log(textareaRef.current)
|
|
||||||
textareaRef.current?.focus();
|
textareaRef.current?.focus();
|
||||||
}, [textareaRef]);
|
}, [textareaRef]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user