Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention 组件突然失效(输入文字后不会自动过滤) #13678

Closed
1 task done
daya0576 opened this issue Dec 18, 2018 · 9 comments
Closed
1 task done

Mention 组件突然失效(输入文字后不会自动过滤) #13678

daya0576 opened this issue Dec 18, 2018 · 9 comments
Assignees
Labels

Comments

@daya0576
Copy link

daya0576 commented Dec 18, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.11.2

Environment

Using @alipay/bigfish@2.7.2 and umi@2.2.8...

Reproduction link

: 「已屏蔽」

Steps to reproduce

  1. 打开页面
  2. 点击mention组件
  3. 输入 @ 输入一些文字

What is expected?

Mention 的下拉列表随文字输入变化

What is actually happening?

无反应


代码: 「已屏蔽」

antd 版本 不太确认:

takachiho3.7) ➜  minimal_reproduction git:(sprint_minimal_reproduction_S901947573_20181218) ✗ tnpx bigfish -v --verbose
🐟 Using @alipay/bigfish@2.7.2 and umi@2.2.8...
bigfish:
@alipay/bigfish@@alipay/bigfish@2.7.2
@alipay/umi-plugin-bigfish@2.7.2
umi@umiVersion

umi:
umi@2.2.8
darwin x64
node@v8.14.0
umi-build-dev@1.2.7
af-webpack@1.2.7
babel-preset-umi@1.2.1
umi-test@1.2.2
react@16.6.3 (/Users/henry/repo/minimal_reproduction/node_modules/_react@16.6.3@react)
react-dom@16.6.3 (/Users/henry/repo/minimal_reproduction/node_modules/_react-dom@16.6.3@react-dom)
react-router@4.3.1 (/Users/henry/repo/minimal_reproduction/node_modules/_react-router@4.3.1@react-router)
react-router-dom@4.3.1 (/Users/henry/repo/minimal_reproduction/node_modules/_react-router-dom@4.3.1@react-router-dom)
umi-plugin-react@1.2.3
@alipay/umi-plugin-antdcloud-nav@2.0.3
dva@2.5.0-beta.2 (/Users/henry/repo/minimal_reproduction/node_modules/_dva@2.5.0-beta.2@dva)
dva-loading@2.1.0-beta.2
dva-immer@0.2.4
path-to-regexp@1.7.0
@yutingzhao1991
Copy link
Contributor

可以用 https://codesandbox.io/s/wk04r016q8 这个复现吗?

@afc163 afc163 added the 🤔 Need Reproduce We cannot reproduce your problem label Dec 18, 2018
@ant-design-bot
Copy link
Contributor

Hello @daya0576. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 7 days.

你好 @daya0576, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。7 天内未跟进的 issue 将会被自动关闭。

@afc163
Copy link
Member

afc163 commented Dec 18, 2018

不要暴露公司内网地址,这样对公司安全和对你的工作都是很危险的。

@daya0576
Copy link
Author

不要暴露公司内网地址,这样对公司安全和对你的工作都是很危险的。

多谢, 帮忙 delete issue 把. 之前可以自动搜索, 现在可能要加下 onSearchChange 方法.

@afc163
Copy link
Member

afc163 commented Dec 18, 2018

image

@daya0576
Copy link
Author

https://codesandbox.io/s/q7k5k2p60j
就是最简单的 Mention, 之前输入文字的时候, 会自动过滤列表, 现在需要去自定义 onSearchChange, 手动过滤.

@afc163
Copy link
Member

afc163 commented Dec 18, 2018

目前的逻辑看着没啥问题,suggestions 应该是可控的,但是 2.x 确实是可以的:https://codesandbox.io/s/vmwxrw2lq5 好奇怪

@zombieJ 有空看看来龙去脉。

@afc163 afc163 removed the 🤔 Need Reproduce We cannot reproduce your problem label Dec 18, 2018
@daya0576
Copy link
Author

目前的逻辑看着没啥问题,suggestions 应该是可控的,但是 2.x 确实是可以的:https://codesandbox.io/s/vmwxrw2lq5 好奇怪
@zombieJ 有空看看来龙去脉。

是的, 很奇怪, 上周开发的时候还是可以自动筛选的.
这周就不一样了.

@zombieJ
Copy link
Member

zombieJ commented Dec 18, 2018

@daya0576 ,
查了一下,suggestions 从半受控变成完全受控的了。
我发 PR 加个 defaultSuggestions 属性,之后用这个。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants