UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

49 lines (48 loc) 1.95 kB
import { TextFieldProps } from '@mui/material/TextField'; import { AutocompleteProps } from '@mui/material'; import { SCGroupType } from '@selfcommunity/types/src/index'; export interface GroupAutocompleteProps extends Pick<AutocompleteProps<SCGroupType | null, any, any, any>, Exclude<keyof AutocompleteProps<SCGroupType | null, any, any, any>, 'open' | 'onOpen' | 'onClose' | 'onChange' | 'filterSelectedOptions' | 'disableCloseOnSelect' | 'options' | 'getOptionLabel' | 'value' | 'selectOnFocus' | 'clearOnBlur' | 'blurOnSelect' | 'handleHomeEndKeys' | 'clearIcon' | 'noOptionsText' | 'isOptionEqualToValue' | 'renderTags' | 'renderOption' | 'renderInput'>> { /** * The maximum number of groups that will be visible when not focused. * @default 0 */ limitCountGroups?: number; /** * If checkbox is selected * @default false */ checkboxSelect?: boolean; /** * The props applied to text field * @default {variant: 'outlined, label: groups_label} */ TextFieldProps?: TextFieldProps; /** * Callback for change event on poll object * @param value */ onChange?: (value: any) => void; } /** * > API documentation for the Community-JS Group 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 groups available in the application. * * #### Import * ```jsx * import {GroupAutocomplete} from '@selfcommunity/react-ui'; * ``` * #### Component Name * The name `SCGroupAutocomplete` can be used when providing style overrides in the theme. * * #### CSS * * |Rule Name|Global class|Description| * |---|---|---| * |root|.SCGroupAutocomplete-root|Styles applied to the root element.| * * @param inProps */ declare const GroupAutocomplete: (inProps: GroupAutocompleteProps) => JSX.Element; export default GroupAutocomplete;