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

SelectField不做任何选择直接点击"取消"会出现再次进入选择面板直接点"完成"无效的情况 #411

Open
1 of 2 tasks
KelWenGek opened this issue Mar 24, 2021 · 1 comment
Labels

Comments

@KelWenGek
Copy link

请按照以下模板填写,不按照标准模板填写的 issue 将降低处理优先级。

这是一个

  • 错误报告
  • 功能需求

SaltUI 版本

4.10.6

浏览器、操作系统等环境信息

复现步骤

SelectField组件
初始value为null
点击弹出选择面板,不做任何操作,直接点击"取消"按钮
再点击弹出选择面板,直接点"完成"按钮,无法选中,
在Slot中的onCancel调用了
handleCancel() {
const t = this;
t.setState({
value: t.state.confirmedValue,
});
}
导致t.lastChoose变成[null],然后
const confirmValue = isNotEmptyValue(t.lastChoose) ? t.lastChoose : t.setDefaultLastChoose();
就判断lastChoose为非空,
如果此时只有一个选择项,就永远无法选择了

  • 你可以在这里提交你的 CodePen 链接 以及描述复现的步骤
@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
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

1 participant