We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
input-text组件使用autoComplete属性时 点击了选项 选项组弹框不消失 需要点击空白处才能消失
你是如何使用 amis 的? sdk
sdk
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 https://img.7ugame.cn/amis/sdk.js
粘贴有问题的完整 amis schema 代码:
amis schema
{ "type": "input-text", "name": "label", "label": "游戏名称", "required": true, "autoComplete": "post:/admin/game/searchGame", "autoFill": { "FDeviceCode": "${FDeviceCode}", "FRelationCode": "${FGameCode}" }, "visibleOn": "${FRelationType == 2}" },
The text was updated successfully, but these errors were encountered:
我大概找到问题所在,也本地测试修复了, 但是不知道有没有其他影响,代码应该也不算太规范,但是解决这个问题了 修改这个文件 packages\amis\src\renderers\Form\InputText.tsx 里面的
async handleClick(event: React.MouseEvent) { const {dispatchEvent, value, multiple} = this.props; const rendererEvent = await dispatchEvent( 'click', resolveEventData(this.props, { value }) ); if (rendererEvent?.prevented) { return; } // 已经 focus 的就不重复执行,否则总重新定位光标 this.state.isFocused || this.focus(); if(multiple ||(event.target as HTMLElement).tagName.toLowerCase() === 'input'){ this.setState({ isOpen: true }); } }
整个替换掉就行了
提交个pr看看能过不能 #10972
Sorry, something went wrong.
allenve
No branches or pull requests
描述问题:
input-text组件使用autoComplete属性时 点击了选项 选项组弹框不消失 需要点击空白处才能消失
截图或视频:
如何复现(请务必完整填写下面内容):
你是如何使用 amis 的?
sdk
amis 版本是什么?请先在最新 beta 版本测试问题是否存在
https://img.7ugame.cn/amis/sdk.js
粘贴有问题的完整
amis schema
代码:请简单描述一下复现的操作步骤...
The text was updated successfully, but these errors were encountered: