mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): focus add node popover on open
Need an extra ref to pass to the InvSelect component.
This commit is contained in:
committed by
Kent Keirsey
parent
5168415999
commit
6209fef63d
@ -65,6 +65,8 @@ const AddNodePopover = () => {
|
||||
const toaster = useAppToaster();
|
||||
const { t } = useTranslation();
|
||||
const selectRef = useRef<SelectInstance<InvSelectOption> | null>(null);
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
const fieldFilter = useAppSelector(
|
||||
(state) => state.nodes.connectionStartFieldType
|
||||
);
|
||||
@ -201,6 +203,7 @@ const AddNodePopover = () => {
|
||||
closeDelay={0}
|
||||
closeOnBlur={true}
|
||||
returnFocusOnClose={true}
|
||||
initialFocusRef={inputRef}
|
||||
>
|
||||
<InvPopoverAnchor>
|
||||
<Flex
|
||||
@ -230,6 +233,7 @@ const AddNodePopover = () => {
|
||||
onChange={onChange}
|
||||
onMenuClose={onClose}
|
||||
onKeyDown={onKeyDown}
|
||||
inputRef={inputRef}
|
||||
/>
|
||||
</InvPopoverBody>
|
||||
</InvPopoverContent>
|
||||
|
Reference in New Issue
Block a user