jd-opensource / jd-opensource/taro-ui

Typescript: Input onKeyPress does not exist

Open
#1,325 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

### Taro UI 版本信息

v2.3.4

### 问题描述

似乎Input组件缺少onKeyPress/onKeyUp/onKeyDown

使用中会存在这个问题:

Property 'onKeyPress' does not exist on type 'IntrinsicAttributes & InputProps & { children?: ReactNode; }'.ts(2322)

### 复现步骤

1. 引入Input组件;
2. 使用该组件;
3. Ts类型检测提示不存在该属性。

### 复现代码

### 报错信息

Property 'onKeyPress' does not exist on type 'IntrinsicAttributes & InputProps & { children?: ReactNode; }'.ts(2322)

### 系统信息

v3.0.11

### 补充信息

是否可以在后面的版本中增加该类型?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.