interface broken in primereact\components\inputtext\InputText.d.ts

UI Components for React
Post Reply
binkle
Posts: 3
Joined: 16 Aug 2018, 15:22

23 Aug 2018, 13:21

Hi,
TS tanspiling fails when using InputText for "onInput" and "onKeyPress".
It should be corrected to:

Code: Select all

import React = require('react');

interface InputTextProps extends React.HTMLProps<HTMLInputElement> {
  [key: string]: any;
  onInput?(event: React.FormEvent<HTMLInputElement>): void;
  onKeyPress?(event: React.FormEvent<HTMLInputElement>): void;
  keyfilter?: any;
  validateOnly?: boolean;
}

export class InputText extends React.Component<InputTextProps, any> {}

cagatay.civici
Prime
Posts: 18098
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Aug 2018, 22:38

Current one is;

Code: Select all

    onInput?(event: React.FormEvent<HTMLInputElement>): void;
    onKeyPress?(event: React.KeyboardEvent<HTMLInputElement>): void;
So should be corrected with upcoming beta.2.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest