UNPKG

extended-dynamic-forms

Version:

Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events

38 lines (36 loc) 1.46 kB
import { default as React } from 'react'; import { ChoiceWidgetProps, ChoiceWidgetState, ChoiceWidgetConfig, PresentationMode } from '../ChoiceWidget.types'; import { PresenterStrategy } from './PresenterStrategy'; /** * Dropdown presenter implementation using Ant Design Select component. * Provides a dropdown/select UI with support for single and multi-select modes, * search functionality, virtual scrolling for large datasets, and full accessibility. * * @class DropdownPresenter * @extends {PresenterStrategy} */ export declare class DropdownPresenter extends PresenterStrategy { readonly presentationMode = PresentationMode.DROPDOWN; /** * Render the dropdown widget using Ant Design Select. */ render(props: ChoiceWidgetProps, state: ChoiceWidgetState): React.ReactElement; /** * Handle selection change from Select component. * Normalizes the value(s) for consistent handling. */ handleSelectionChange(value: unknown, props: ChoiceWidgetProps, _state: ChoiceWidgetState): (string | number | boolean)[]; /** * Get default configuration for dropdown presentation. */ getDefaultProps(): Partial<ChoiceWidgetConfig>; /** * Validate dropdown-specific configuration. */ validateProps(config: ChoiceWidgetConfig): string[] | null; /** * Get the ARIA role for dropdown presentation. */ protected getAriaRole(): string; } export default DropdownPresenter;