@codecademy/gamut
74.0.174.0.2-alpha.b25375.0
dist/Form/SelectDropdown/elements/containers.d.ts~
dist/Form/SelectDropdown/elements/containers.d.tsModified+12−5
Index: package/dist/Form/SelectDropdown/elements/containers.d.ts
===================================================================
--- package/dist/Form/SelectDropdown/elements/containers.d.ts
+++ package/dist/Form/SelectDropdown/elements/containers.d.ts
@@ -17,16 +17,23 @@
/**
* Custom container component that adds a hidden input for form submission.
* Renders the selected values as a comma-separated string in the hidden input.
*/
-export declare const CustomContainer: ({ children, ...rest }: CustomSelectComponentProps<typeof SelectDropdownElements.SelectContainer>) => import("react/jsx-runtime").JSX.Element;
+export declare const CustomContainer: ({ children, innerProps, ...rest }: CustomSelectComponentProps<typeof SelectDropdownElements.SelectContainer>) => import("react/jsx-runtime").JSX.Element;
/**
- * Custom ValueContainer component that applies combobox props when isSearchable is false.
- * When isSearchable is false, react-select renders a dummy input (div) that doesn't accept
- * custom props, so we apply the combobox data attributes to the ValueContainer's innerProps.
+ * Non-searchable: react-select opens the menu on mousedown only once its input has
+ * focus, and the hidden input can't take focus. Open from the control instead, so a
+ * click on the padding works. Child handlers (the chevron, the clear button) call
+ * preventDefault first, so they keep their behaviour.
*/
-export declare const CustomValueContainer: ({ ...rest }: CustomSelectComponentProps<typeof SelectDropdownElements.ValueContainer>) => import("react/jsx-runtime").JSX.Element;
+export declare const CustomControl: ({ innerProps, ...rest }: CustomSelectComponentProps<typeof SelectDropdownElements.Control>) => import("react/jsx-runtime").JSX.Element;
/**
+ * Custom ValueContainer component. When isSearchable is false, it becomes the
+ * select-only combobox trigger (see `useSelectOnlyInput`). Otherwise it renders
+ * react-select's default ValueContainer.
+ */
+export declare const CustomValueContainer: ({ innerProps, ...rest }: CustomSelectComponentProps<typeof SelectDropdownElements.ValueContainer>) => import("react/jsx-runtime").JSX.Element;
+/**
* Custom Input component that passes combobox props to the react-select input.
* This allows data-* attributes and other props to be applied to the visible input element.
* Works for both searchable and non-searchable modes by using the react-select Input component.
*/