Country select
Country select allows users to make a single selection from a list of countries.Props
| Description | No description. |
|---|---|
| Type | "default" | "subtle" | "none" |
| Description | HTML ID of an element that should be used as a description (for assistive tech) {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
Use |
|---|---|
| Type | string |
| Description | HTML ID of an element containing an error message related to the input {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} aria-errormessage is not supported widely by assistive technologies. Do not use! |
|---|---|
| Type | string |
| Description | Indicate if the value entered in the field is invalid {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
Use |
|---|---|
| Type | boolean | "false" | "true" | "grammar" | "spelling" |
| Description | Aria label (for assistive tech) {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
Use |
|---|---|
| Type | string |
| Description | HTML ID of an element that should be used as the label (for assistive tech) {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
Use |
|---|---|
| Type | string |
| Description | Used to set the priority with which screen reader should treat updates to live regions. The possible settings are: off, polite (default) or assertive {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} Will be removed in future versions. |
|---|---|
| Type | "off" | "assertive" | "polite" |
| Description | Customise the messages used by the aria-live component {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} |
|---|---|
| Type | AriaLiveMessages<Country, false, GroupBase<Country>> |
| Description | Focus the control when it is mounted. There are very few cases that this should be used, and using incorrectly may violate accessibility guidelines. |
|---|---|
| Type | boolean |
| Description | Remove the currently focused option when the user presses backspace when Select isClearable or isMulti {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be handled automatically to support expected keyboard accessibility. |
|---|---|
| Type | boolean |
| Description | Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices) |
|---|---|
| Type | boolean |
| Description | When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} |
|---|---|
| Type | boolean |
| Description | Sets a className attribute on the outer component {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
If used for testing purposes, use the |
|---|---|
| Type | string |
| Description | If provided, all inner components will be given a prefixed className attribute. This is useful when styling via CSS classes instead of the Styles API approach. |
|---|---|
| Type | string |
| Description | Provide classNames based on state for each inner component |
|---|---|
| Type | { clearIndicator?: (props: ClearIndicatorProps<Country, false, GroupBase<Country>>) => string; container?: (props: ContainerProps<Country, false, GroupBase<...>>) => string; ... 18 more ...; valueContainer?: (props: ValueContainerProps<...>) => string; } |
| Description | Set the |
|---|---|
| Type | string |
| Description | If If a function, takes a standard javascript
This is useful when you have a scrollable modal and want to portal the menu out, but want to avoid graphical issues. {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} |
|---|---|
| Type | boolean | ((event: Event) => boolean) |
| Description | Close the select menu when the user selects an option |
|---|---|
| Type | boolean |
| Description | This complex object includes all the compositional components that are used
in |
|---|---|
| Type | { Option?: React.ComponentType<OptionProps<Country, false, GroupBase<Country>>>; Group?: React.ComponentType<GroupProps<Country, false, GroupBase<Country>>>; ... 19 more ...; ValueContainer?: React.ComponentType<...>; } |
| Description | Whether the value of the select, e.g. SingleValue, should be displayed in the control. {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} |
|---|---|
| Type | boolean |
| Description | You should not be accessing this prop under any circumstances.
It is provided by |
|---|---|
| Type | (payload: AnalyticsEventPayload) => UIAnalyticsEvent |
| Description | No description. |
|---|---|
| Type | string |
| Description | No description. |
|---|---|
| Type | boolean |
| Description | No description. |
|---|---|
| Type | Country | MultiValue<Country> |
| Description | Delimiter used to join multiple values into a single HTML Input value {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} |
|---|---|
| Type | string |
| Description | This sets the aria-describedby attribute. It sets an accessible description for the select, for people who use assistive technology. Use '<HelperMessage>' from '@atlaskit/form' is preferred. |
|---|---|
| Type | string |
| Description | Clear all values when the user presses escape AND the menu is closed. {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be handled automatically to support expected keyboard accessibility. |
|---|---|
| Type | boolean |
| Description | Custom method to filter whether an option should be displayed in the menu |
|---|---|
| Type | (option: FilterOptionOption<Country>, inputValue: string) => boolean |
| Description | Sets the form attribute on the input |
|---|---|
| Type | string |
| Description | Formats group labels in the menu as React components An example can be found in the Replacing builtins documentation. |
|---|---|
| Type | (group: GroupBase<Country>) => React.ReactNode |
| Description | No description. |
|---|---|
| Type | (data: Country, formatOptionLabelMeta: FormatOptionLabelMeta<Country>) => React.ReactNode |
| Description | Resolves option data to a string to be displayed as the label by components Note: Failure to resolve to a string type can interfere with filtering and screen reader support. |
|---|---|
| Type | (option: Country) => string |
| Description | Resolves option data to a string to compare options and specify value attributes |
|---|---|
| Type | (option: Country) => string |
| Description | Hide the selected option from the menu |
|---|---|
| Type | boolean |
| Description | The id to set on the SelectContainer component. |
|---|---|
| Type | string |
| Description | The id of the search input |
|---|---|
| Type | string |
| Description | The value of the search input |
|---|---|
| Type | string |
| Description | Define an id prefix for the select components e.g. {your-id}-value |
|---|---|
| Type | string | number |
| Description | Is the select value clearable |
|---|---|
| Type | boolean |
| Description | Is the select disabled |
|---|---|
| Type | boolean |
| Description | Is the select invalid |
|---|---|
| Type | boolean |
| Description | Is the select in a state of loading (async) |
|---|---|
| Type | boolean |
| Description | Support multiple selected options |
|---|---|
| Type | booleanfalse |
| Description | Override the built-in logic to detect whether an option is disabled An example can be found in the Replacing builtins documentation. |
|---|---|
| Type | (option: Country, selectValue: Options<Country>) => boolean |
| Description | Override the built-in logic to detect whether an option is selected |
|---|---|
| Type | (option: Country, selectValue: Options<Country>) => boolean |
| Description | This prop indicates if the component is required. |
|---|---|
| Type | boolean |
| Description | Is the select direction right-to-left {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} |
|---|---|
| Type | boolean |
| Description | Whether to enable search functionality |
|---|---|
| Type | boolean |
| Description | This sets the aria-label attribute. It sets an accessible name for the select, for people who use assistive technology. Use of a visible label is highly recommended for greater accessibility support. |
|---|---|
| Type | string |
| Description | This sets the aria-labelledby attribute. It sets an accessible name for the select, for people who use assistive technology. Use of a visible label is highly recommended for greater accessibility support. |
|---|---|
| Type | string |
| Description | Async: Text to display when loading options |
|---|---|
| Type | (obj: { inputValue: string; }) => React.ReactNode |
| Description | Maximum height of the menu before scrolling |
|---|---|
| Type | number |
| Description | Minimum height of the menu before flipping |
|---|---|
| Type | number |
| Description | Name of the HTML Input (optional - without this, no input will be rendered) |
|---|---|
| Type | string |
| Description | No description. |
|---|---|
| Type | (obj: { inputValue: string; }) => React.ReactNode |
| Description | Handle blur events on the control |
|---|---|
| Type | (event: React.FocusEvent<HTMLInputElement, Element>) => void |
| Description | Handle change events on the select |
|---|---|
| Type | (newValue: Country, actionMeta: ActionMeta<Country>) => void |
| Description | No description. |
|---|---|
| Type | boolean |
| Description | Handle focus events on the control |
|---|---|
| Type | (event: React.FocusEvent<HTMLInputElement, Element>) => void |
| Description | Handle change events on the input |
|---|---|
| Type | (newValue: string, actionMeta: InputActionMeta) => void |
| Description | Handle key down events on the select |
|---|---|
| Type | (event: React.KeyboardEvent<HTMLDivElement>) => void |
| Description | Handle the menu closing |
|---|---|
| Type | () => void |
| Description | Handle the menu opening |
|---|---|
| Type | () => void |
| Description | Fired when the user scrolls to the bottom of the menu |
|---|---|
| Type | (event: WheelEvent | TouchEvent) => void |
| Description | Fired when the user scrolls to the top of the menu |
|---|---|
| Type | (event: WheelEvent | TouchEvent) => void |
| Description | Allows control of whether the menu is opened when the Select is clicked {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be removed to support expected accessibility interactions. |
|---|---|
| Type | boolean |
| Description | Allows control of whether the menu is opened when the Select is focused {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be removed to support expected accessibility interactions. |
|---|---|
| Type | boolean |
| Description | Array of options that populate the select menu |
|---|---|
| Type | readonly (Country | GroupBase<Country>)[] |
| Description | Number of options to jump in menu when page{up|down} keys are used |
|---|---|
| Type | number |
| Description | Placeholder for the select value |
|---|---|
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | No description. |
|---|---|
| Type | ((instance: any) => void) | React.RefObject<any> |
| Description | Marks the value-holding input as required for form validation {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
Use |
|---|---|
| Type | boolean |
| Description | Status to relay to screen readers {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} |
|---|---|
| Type | (obj: { count: number; }) => string |
| Description | Prevents "Escape" keydown event propagation |
|---|---|
| Type | boolean |
| Description | This prop affects the height of the select control. Compact is gridSize() * 4, default is gridSize * 5 |
|---|---|
| Type | "compact" | "default" |
| Description | Style modifier methods {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
Use the |
|---|---|
| Type | { clearIndicator?: (base: any, props: ClearIndicatorProps<Country, false, GroupBase<Country>>) => any; container?: (base: any, props: ContainerProps<...>) => any; ... 18 more ...; valueContainer?: (base: any, props: ValueContainerProps<...>) => any; } |
| Description | Sets the tabIndex attribute on the input for focus. Since focus is already managed, the only acceptable value to be used is '-1' in rare cases when removing this field from the document tab order is required. |
|---|---|
| Type | number |
| Description | Select the currently focused option when the user presses tab {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be handled automatically to support expected keyboard accessibility. |
|---|---|
| Type | boolean |
| Description | A unique string that appears as data attribute data-testid in the rendered code, serving as a hook for automated tests. Use this instead of using ARIA properties as locators.
|
|---|---|
| Type | string |
| Description | No description. |
|---|---|
| Type | boolean |
| Description | Use isInvalid instead. The state of validation if used in a form. |
|---|---|
| Type | "default" | "error" | "success" |
| Description | The value of the select; reflected by the selected option |
|---|---|
| Type | Country | MultiValue<Country> |