@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
49 lines (48 loc) • 1.95 kB
TypeScript
import { TextFieldProps } from '@mui/material/TextField';
import { AutocompleteProps } from '@mui/material';
import { SCEventType } from '@selfcommunity/types/src/index';
export interface EventAutocompleteProps extends Pick<AutocompleteProps<SCEventType | null, any, any, any>, Exclude<keyof AutocompleteProps<SCEventType | 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 events that will be visible when not focused.
* @default 0
*/
limitCountEvents?: number;
/**
* If checkbox is selected
* @default false
*/
checkboxSelect?: boolean;
/**
* The props applied to text field
* @default {variant: 'outlined, label: events_label}
*/
TextFieldProps?: TextFieldProps;
/**
* Callback for change event on event object
* @param value
*/
onChange?: (value: any) => void;
}
/**
* > API documentation for the Community-JS Event 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 events available in the application.
*
* #### Import
* ```jsx
* import {EventAutocomplete} from '@selfcommunity/react-ui';
* ```
* #### Component Name
* The name `SCEventAutocomplete` can be used when providing style overrides in the theme.
*
* #### CSS
*
* |Rule Name|Global class|Description|
* |---|---|---|
* |root|.SCEventAutocomplete-root|Styles applied to the root element.|
*
* @param inProps
*/
declare const EventAutocomplete: (inProps: EventAutocompleteProps) => JSX.Element;
export default EventAutocomplete;