rc-cascader

  • Version 3.28.1
  • Published
  • 198 kB
  • 6 dependencies
  • MIT license

Install

npm i rc-cascader
yarn add rc-cascader
pnpm add rc-cascader

Overview

cascade select ui component for react

Index

Variables

variable Cascader

const Cascader: (<
OptionType extends DefaultOptionType = DefaultOptionType,
ValueField extends keyof OptionType = keyof OptionType,
Multiple extends React.ReactNode = false
>(
props: CascaderProps<OptionType, ValueField, Multiple> & {
children?: React.ReactNode;
} & { ref?: React.Ref<CascaderRef> | undefined }
) => React.ReactElement) & {
displayName?: string | undefined;
SHOW_PARENT: typeof SHOW_PARENT;
SHOW_CHILD: typeof SHOW_CHILD;
Panel: typeof Panel;
};

    Functions

    function Panel

    Panel: <
    OptionType extends DefaultOptionType = DefaultOptionType,
    ValueField extends keyof OptionType = keyof OptionType,
    Multiple extends unknown = false
    >(
    props: PanelProps<OptionType, ValueField, Multiple>
    ) => React.JSX.Element;

      Interfaces

      interface BaseOptionType

      interface BaseOptionType {}

        property children

        children?: DefaultOptionType[];

          property disableCheckbox

          disableCheckbox?: boolean;

            property disabled

            disabled?: boolean;

              property label

              label?: React.ReactNode;

                property value

                value?: string | number | null;

                  interface CascaderProps

                  interface CascaderProps<
                  OptionType extends DefaultOptionType = DefaultOptionType,
                  ValueField extends keyof OptionType = keyof OptionType,
                  Multiple extends boolean | React.ReactNode = false
                  > extends BaseCascaderProps<OptionType, ValueField> {}

                    property checkable

                    checkable?: Multiple;

                      property defaultValue

                      defaultValue?: GetValueType<OptionType, ValueField, Multiple>;

                        property onChange

                        onChange?: (
                        value: GetValueType<OptionType, ValueField, Multiple>,
                        selectOptions: OptionType[]
                        ) => void;

                          property value

                          value?: GetValueType<OptionType, ValueField, Multiple>;

                            interface FieldNames

                            interface FieldNames<
                            OptionType extends DefaultOptionType = DefaultOptionType,
                            ValueField extends keyof OptionType = keyof OptionType
                            > {}

                              property children

                              children?: keyof OptionType;

                                property label

                                label?: keyof OptionType;

                                  property value

                                  value?: keyof OptionType | ValueField;

                                    interface ShowSearchType

                                    interface ShowSearchType<
                                    OptionType extends DefaultOptionType = DefaultOptionType,
                                    ValueField extends keyof OptionType = keyof OptionType
                                    > {}

                                      property filter

                                      filter?: (
                                      inputValue: string,
                                      options: OptionType[],
                                      fieldNames: FieldNames<OptionType, ValueField>
                                      ) => boolean;

                                        property limit

                                        limit?: number | false;

                                          property matchInputWidth

                                          matchInputWidth?: boolean;

                                            property render

                                            render?: (
                                            inputValue: string,
                                            path: OptionType[],
                                            prefixCls: string,
                                            fieldNames: FieldNames<OptionType, ValueField>
                                            ) => React.ReactNode;

                                              property sort

                                              sort?: (
                                              a: OptionType[],
                                              b: OptionType[],
                                              inputValue: string,
                                              fieldNames: FieldNames<OptionType, ValueField>
                                              ) => number;

                                                Type Aliases

                                                type CascaderRef

                                                type CascaderRef = Omit<BaseSelectRef, 'scrollTo'>;

                                                  type DefaultOptionType

                                                  type DefaultOptionType = BaseOptionType & Record<string, any>;

                                                    Package Files (3)

                                                    Dependencies (6)

                                                    Dev Dependencies (30)

                                                    Peer Dependencies (2)

                                                    Badge

                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rc-cascader.

                                                    • Markdown
                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rc-cascader)
                                                    • HTML
                                                      <a href="https://www.jsdocs.io/package/rc-cascader"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>