From 5dfa8678c05adfe467f0e57e5256ef88ce5ce9c3 Mon Sep 17 00:00:00 2001 From: zombiej Date: Wed, 20 Apr 2022 10:33:42 +0800 Subject: [PATCH] docs: add input showCount lose focus desc. close #35080 --- components/input/index.en-US.md | 4 ++-- components/input/index.zh-CN.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/input/index.en-US.md b/components/input/index.en-US.md index fabcc3865b..a684eb1f40 100644 --- a/components/input/index.en-US.md +++ b/components/input/index.en-US.md @@ -96,9 +96,9 @@ Supports all props of `Input`. ## FAQ -### Why Input lose focus when change `prefix/suffix` +### Why Input lose focus when change `prefix/suffix/showCount` -When Input dynamic add or remove `prefix/suffix` will make React recreate the dom structure and new input will be not focused. You can set an empty `` element to keep the dom structure: +When Input dynamic add or remove `prefix/suffix/showCount` will make React recreate the dom structure and new input will be not focused. You can set an empty `` element to keep the dom structure: ```jsx const suffix = condition ? : ; diff --git a/components/input/index.zh-CN.md b/components/input/index.zh-CN.md index 9ed2c1deda..ac7401cf31 100644 --- a/components/input/index.zh-CN.md +++ b/components/input/index.zh-CN.md @@ -97,9 +97,9 @@ Input 的其他属性和 React 自带的 [input](https://reactjs.org/docs/dom-el ## FAQ -### 为什么我动态改变 `prefix/suffix` 时,Input 会失去焦点? +### 为什么我动态改变 `prefix/suffix/showCount` 时,Input 会失去焦点? -当 Input 动态添加或者删除 `prefix/suffix` 时,React 会重新创建 DOM 结构而新的 input 是没有焦点的。你可以预设一个空的 `` 来保持 DOM 结构不变: +当 Input 动态添加或者删除 `prefix/suffix/showCount` 时,React 会重新创建 DOM 结构而新的 input 是没有焦点的。你可以预设一个空的 `` 来保持 DOM 结构不变: ```jsx const suffix = condition ? : ;