ant-design/components/input/demo/allowClear.md
Rustin 767d2d0638 feat: Add allowClear to TextArea (#19310)
* add allow clear to textarea

revert textarea md

refactor textarea css

fix textarea props bug

add test and update snapshot

update doc

add margin

refactor textarea to reuse fixControlledValue and setValue method

add clearable input to reuse code

refactor clearable input

finish refactor

refactor clearable input

refactor input and textArea

finish refactor

update test snapshots

fix input props bug

fix dom issue

fix textarea dom issue

fix textarea test bug

fix textarea dom issue

refactor code and fix textarea dom issue

fix input dom issue

fix typo error

update test snapshots

fix ci failed issues

adjust margin

* remove useless code fix ci failed issue

* fix textarea padding issue

* update snapshots

* fix padding issue
2019-11-01 18:19:29 +08:00

589 B

order title
11
zh-CN en-US
带移除图标 With clear icon

zh-CN

带移除图标的输入框,点击图标删除所有内容。

en-US

Input box with the remove icon, click the icon to delete everything.

import { Input } from 'antd';

const { TextArea } = Input;

const onChange = e => {
  console.log(e);
};

ReactDOM.render(
  <div>
    <Input placeholder="input with clear icon" allowClear onChange={onChange} />
    <br />
    <br />
    <TextArea placeholder="textarea with clear icon" allowClear onChange={onChange} />
  </div>,
  mountNode,
);