Input.d.ts 994 B

12345678910111213141516171819202122232425262728
  1. import * as React from 'react';
  2. import type { PickerRef } from '../../interface';
  3. export interface InputRef extends PickerRef {
  4. inputElement: HTMLInputElement;
  5. }
  6. export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
  7. format?: string;
  8. validateFormat: (value: string) => boolean;
  9. active?: boolean;
  10. /** Used for single picker only */
  11. showActiveCls?: boolean;
  12. suffixIcon?: React.ReactNode;
  13. value?: string;
  14. onChange: (value: string) => void;
  15. onSubmit: VoidFunction;
  16. /** Meaning current is from the hover cell getting the placeholder text */
  17. helped?: boolean;
  18. /**
  19. * Trigger when input need additional help.
  20. * Like open the popup for interactive.
  21. */
  22. onHelp: () => void;
  23. preserveInvalidOnBlur?: boolean;
  24. invalid?: boolean;
  25. clearIcon?: React.ReactNode;
  26. }
  27. declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
  28. export default Input;