-
-
Notifications
You must be signed in to change notification settings - Fork 49.2k
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
fix(#23019): display defaultValue when no matched options #24058
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
有些代码被代码格式化自动修改。 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 25831a0:
|
@afc163 好像modal那失败了,是调整了什么吗? |
rebase master |
Codecov Report
@@ Coverage Diff @@
## master #24058 +/- ##
==========================================
- Coverage 98.83% 98.82% -0.02%
==========================================
Files 364 364
Lines 7290 7292 +2
Branches 2017 1981 -36
==========================================
+ Hits 7205 7206 +1
- Misses 85 86 +1
Continue to review full report at Codecov.
|
之前在这个测试用例其实已经覆盖了,但是就是没有执行,然而在本地就会执行。 it('should select item immediately when searching and pressing down arrow key', () => {
const wrapper = mount(<Cascader options={options} showSearch={{ filter }} />);
wrapper.find('input').simulate('click');
wrapper.find('input').simulate('change', { target: { value: 'a' } });
expect(wrapper.find('.ant-cascader-menu-item').length).toBe(2);
expect(wrapper.find('.ant-cascader-menu-item-active').length).toBe(0);
wrapper.find('input').simulate('keyDown', {
keyCode: KeyCode.DOWN,
});
expect(wrapper.find('.ant-cascader-menu-item-active').length).toBe(1);
}); 这是之前的PR#22216 |
🤔 This is a ...
🔗 Related issue link
close #23019
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge