当前位置:网站首页>[pit avoidance means "difficult"] antd select fuzzy search
[pit avoidance means "difficult"] antd select fuzzy search
2022-06-25 13:16:00 【Coconut brine Engineer】
<Select
allowClear
showSearch
filterOption={
(input, option) => {
if (option && option.title) {
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
} else {
return true
}
}}
defaultActiveFirstOption={
false}
onChange={
handleSourceChange}
placeholder=" Please select "
style={
{
width: 280 }}
>
{
list?.map((v: any) => {
return (
<Select.Option value={
v.id} key={
v.id} title={
v.name}>
{
v.name}
</Select.Option>
);
})}
</Select>
️ Be careful :Select.Option
Be sure to configure title
, Otherwise, fuzzy matching is impossible .
<Select.Option value={
v.id} key={
v.id} title={
v.name}>
{
v.name}
</Select.Option>
边栏推荐
- 出手即不凡,这很 Oracle!
- 字节跳动Dev Better技术沙龙来啦!参与活动赢好礼,限时免费报名中!
- KVM script management - the road to dream
- Possible problems when idea encounters errors occurred while compiling module (solved)
- Another night when visdom crashed
- 几分钟上线一个网站 真是神器
- Sword finger offer II 032 Effective anagrams
- [machine learning] parameter learning and gradient descent
- Which Chinese virtual human is better? Sullivan, IDC: Xiaobing Baidu Shangtang ranks in the first echelon
- 《MongoDB入门教程》第01篇 MongoDB简介
猜你喜欢
515. Find Largest Value in Each Tree Row
Some knowledge about structure, enumeration and union
關於數據在內存中的存儲下
关于扫雷的简易实现
The editor is used every day. What is the working principle of language service protocol?
golang键盘输入语句scanln scanf代码示例
À propos du stockage des données en mémoire
CUDA error: unspecified launch failure
剑指 Offer 第 1 天栈与队列(简单)
[flask tutorial] flask development foundation and introduction
随机推荐
leetcode - 384. 打乱数组
Meichuang was selected into the list of "2022 CCIA top 50 Chinese network security competitiveness"
golang键盘输入语句scanln scanf代码示例
KVM 脚本管理 —— 筑梦之路
Summer Ending
出手即不凡,这很 Oracle!
MySQL learning notes
RESTful和RPC
Sword finger offer II 028 Flatten multi-level bidirectional linked list
美创入选“2022 CCIA中国网络安全竞争力50强”榜单
Django framework - caching, signaling, cross site request forgery, cross domain issues, cookie session token
Which Chinese virtual human is better? Sullivan, IDC: Xiaobing Baidu Shangtang ranks in the first echelon
20220620 interview reply
Detailed explanation of string operation functions and memory functions
QT display ffmpeg decoded pictures
The editor is used every day. What is the working principle of language service protocol?
Possible problems when idea encounters errors occurred while compiling module (solved)
Native JS --- infinite scrolling
Confusion caused by the ramp
Fedora 35 部署DNS主从和分离解析 —— 筑梦之路