Skip to main content

CategoryAutocomplete

Interfaces

CategoryAutocompleteProps

Extends

  • Pick<AutocompleteProps<SCCategoryType | null, any, any, any>, Exclude<keyof AutocompleteProps<SCCategoryType | null, any, any, any>, "open" | "onOpen" | "onClose" | "onChange" | "filterSelectedOptions" | "disableCloseOnSelect" | "options" | "getOptionLabel" | "value" | "selectOnFocus" | "clearOnBlur" | "blurOnSelect" | "handleHomeEndKeys" | "clearIcon" | "noOptionsText" | "isOptionEqualToValue" | "renderTags" | "renderOption" | "renderInput">>

Properties

PropertyTypeDescription
checkboxSelect?booleanIf checkbox is selected Default false
endpointQueryParams?Record<string, string | number | boolean>Feed API Query Params Default [{'limit': 10, 'offset': 0}]
limitCountCategories?numberThe maximum number of categories that will be visible when not focused. Default 0
onChange?(value) => voidCallback for change event on poll object
TextFieldProps?TextFieldPropsThe props applied to text field Default {variant: 'outlined, label: categories_label}

Functions

CategoryAutocomplete()

CategoryAutocomplete(inProps): Element

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

This component renders a bar that allows users to search (with autocomplete) for all the categories available in the application. Take a look at our demo component here

Import

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

Component Name

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

CSS

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

Parameters

ParameterTypeDescription
inPropsCategoryAutocompleteProps

Returns

Element