rc-input-number

  • Version 9.3.0
  • Published
  • 81.5 kB
  • 5 dependencies
  • MIT license

Install

npm i rc-input-number
yarn add rc-input-number
pnpm add rc-input-number

Overview

React input-number component

Index

Variables

variable InputNumber

const InputNumber: (<T extends ValueType = ValueType>(
props: InputNumberProps<T> & { children?: React.ReactNode } & {
ref?: React.Ref<HTMLInputElement>;
}
) => React.ReactElement) & { displayName?: string };

    Interfaces

    interface InputNumberProps

    interface InputNumberProps<T extends ValueType = ValueType>
    extends Omit<
    React.InputHTMLAttributes<HTMLInputElement>,
    'value' | 'defaultValue' | 'onInput' | 'onChange' | 'prefix' | 'suffix'
    > {}

      property addonAfter

      addonAfter?: React.ReactNode;

        property addonBefore

        addonBefore?: React.ReactNode;

          property changeOnBlur

          changeOnBlur?: boolean;
          • Trigger change onBlur event. If disabled, user must press enter or click handler to confirm the value update

          property changeOnWheel

          changeOnWheel?: boolean;

            property className

            className?: string;

              property classNames

              classNames?: BaseInputProps['classNames'] & {
              input?: string;
              };

                property controls

                controls?: boolean;

                  property decimalSeparator

                  decimalSeparator?: string;
                  • Syntactic sugar of formatter. Config decimal separator of display.

                  property defaultValue

                  defaultValue?: T;

                    property downHandler

                    downHandler?: React.ReactNode;

                      property formatter

                      formatter?: (
                      value: T | undefined,
                      info: {
                      userTyping: boolean;
                      input: string;
                      }
                      ) => string;
                      • Transform value to display value show in input

                      property keyboard

                      keyboard?: boolean;

                        property max

                        max?: T;

                          property min

                          min?: T;

                            property onChange

                            onChange?: (value: T | null) => void;

                              property onInput

                              onInput?: (text: string) => void;

                                property onPressEnter

                                onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;

                                  property onStep

                                  onStep?: (
                                  value: T,
                                  info: {
                                  offset: ValueType;
                                  type: 'up' | 'down';
                                  }
                                  ) => void;

                                    property parser

                                    parser?: (displayValue: string | undefined) => T;
                                    • Parse display value to validate number

                                    property precision

                                    precision?: number;
                                    • Syntactic sugar of formatter. Config precision of display.

                                    property prefix

                                    prefix?: React.ReactNode;

                                      property prefixCls

                                      prefixCls?: string;

                                        property step

                                        step?: ValueType;

                                          property stringMode

                                          stringMode?: boolean;
                                          • value will show as string

                                          property style

                                          style?: React.CSSProperties;

                                            property suffix

                                            suffix?: React.ReactNode;

                                              property tabIndex

                                              tabIndex?: number;

                                                property upHandler

                                                upHandler?: React.ReactNode;

                                                  property value

                                                  value?: T | null;

                                                    interface InputNumberRef

                                                    interface InputNumberRef extends HTMLInputElement {}

                                                      property blur

                                                      blur: () => void;

                                                        property focus

                                                        focus: (options?: InputFocusOptions) => void;

                                                          property nativeElement

                                                          nativeElement: HTMLElement;

                                                            Package Files (2)

                                                            Dependencies (5)

                                                            Dev Dependencies (31)

                                                            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-input-number.

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