context.d.ts 900 B

123456789101112131415161718192021
  1. import * as React from 'react';
  2. import type { CascaderProps, InternalFieldNames, DefaultOptionType, SingleValueType } from './Cascader';
  3. export interface CascaderContextProps {
  4. options: NonNullable<CascaderProps['options']>;
  5. fieldNames: InternalFieldNames;
  6. values: SingleValueType[];
  7. halfValues: SingleValueType[];
  8. changeOnSelect?: boolean;
  9. onSelect: (valuePath: SingleValueType) => void;
  10. checkable?: boolean | React.ReactNode;
  11. searchOptions: DefaultOptionType[];
  12. dropdownPrefixCls?: string;
  13. loadData?: (selectOptions: DefaultOptionType[]) => void;
  14. expandTrigger?: 'hover' | 'click';
  15. expandIcon?: React.ReactNode;
  16. loadingIcon?: React.ReactNode;
  17. dropdownMenuColumnStyle?: React.CSSProperties;
  18. optionRender?: CascaderProps['optionRender'];
  19. }
  20. declare const CascaderContext: React.Context<CascaderContextProps>;
  21. export default CascaderContext;