Skip to main content

LocationAutocomplete

Interfaces

LocationAutocompleteProps

Extends

  • Pick<AutocompleteProps<SCContributionLocation, false, false, true>, Exclude<keyof AutocompleteProps<SCContributionLocation, false, false, true>, "options" | "getOptionLabel" | "filterOptions" | "autoComplete" | "includeInputInList" | "filterSelectedOptions" | "value" | "selectOnFocus" | "handleHomeEndKeys" | "noOptionsText" | "onChange" | "onInputChange" | "isOptionEqualToValue" | "renderInput" | "renderOption">>

Properties

PropertyTypeDescription
TextFieldProps?TextFieldPropsThe props applied to the text field.

Default
{variant: 'outlined, label: location_label}
onChange?(value: any) => voidCallback for change event on poll object

Default
null

Functions

LocationAutocomplete()

LocationAutocomplete(inProps): JSX.Element

API documentation for the Community-JS Location Autocomplete component. Learn about the available props and the CSS API.

This component renders a bar that allows users to search (with autocomplete) for cities names. Take a look at our demo component here

Import

import {LocationAutocomplete} from '@selfcommunity/react-ui';

Component Name

The name SCLocationAutocomplete can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCLocationAutocomplete-rootStyles applied to the root element.

Parameters

ParameterTypeDescription
inPropsLocationAutocompleteProps

Returns

JSX.Element

Source

packages/react-ui/src/components/LocationAutocomplete/LocationAutocomplete.tsx:83