@bitrise/bitkit 12.15.6 → 12.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -84,6 +84,7 @@ export interface DropdownProps<T> extends ChakraProps {
|
|
|
84
84
|
children?: ReactNode;
|
|
85
85
|
iconName?: TypeIconName;
|
|
86
86
|
formLabel?: ReactNode;
|
|
87
|
+
returnFocus?: boolean;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
function useOptionListWithIndexes({ children }: { children: ReactNode }) {
|
|
@@ -261,6 +262,7 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
|
|
|
261
262
|
search,
|
|
262
263
|
size = 'medium',
|
|
263
264
|
formLabel: customFormLabel,
|
|
265
|
+
returnFocus = true,
|
|
264
266
|
...props
|
|
265
267
|
},
|
|
266
268
|
ref,
|
|
@@ -318,7 +320,7 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
|
|
|
318
320
|
readOnly={readOnly}
|
|
319
321
|
/>
|
|
320
322
|
{isOpen && (
|
|
321
|
-
<FloatingFocusManager initialFocus={searchRef} context={floatingContext}>
|
|
323
|
+
<FloatingFocusManager initialFocus={searchRef} context={floatingContext} returnFocus={returnFocus}>
|
|
322
324
|
<chakra.div {...floatingProps} sx={listStyles}>
|
|
323
325
|
{searchElement}
|
|
324
326
|
<chakra.div tabIndex={-1} ref={optionsRef} __css={dropdownStyles.options}>
|