ant-design/components/auto-complete/demo/non-case-sensitive.md
2019-05-07 14:57:32 +08:00

647 B

order title
3
zh-CN en-US
不区分大小写 Non-case-sensitive AutoComplete

zh-CN

不区分大小写的 AutoComplete

en-US

A non-case-sensitive AutoComplete

import { AutoComplete } from 'antd';

const dataSource = ['Burns Bay Road', 'Downing Street', 'Wall Street'];

function Complete() {
  return (
    <AutoComplete
      style={{ width: 200 }}
      dataSource={dataSource}
      placeholder="try to type `b`"
      filterOption={(inputValue, option) =>
        option.props.children.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1
      }
    />
  );
}

ReactDOM.render(<Complete />, mountNode);