Skip to content

Commit fcc578d

Browse files
committed
chore: lots of logic
1 parent 8101a4c commit fcc578d

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/SelectInput/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const DEFAULT_OMIT_PROPS = [
5151
'onInputKeyDown',
5252
'onPopupScroll',
5353
'tabIndex',
54+
'activeValue',
5455
] as const;
5556

5657
export default React.forwardRef<SelectInputRef, SelectInputProps>(function SelectInput(

tests/Combobox.test.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,6 @@ describe('Select.Combobox', () => {
363363
expect(container.querySelector('.rc-select-clear')).toBeFalsy();
364364
});
365365

366-
return;
367-
368366
it('autocomplete - option update when input change', () => {
369367
class App extends React.Component {
370368
public state = {
@@ -469,6 +467,7 @@ describe('Select.Combobox', () => {
469467
});
470468

471469
it('should reset value by control', () => {
470+
jest.useFakeTimers();
472471
const onChange = jest.fn();
473472
const { container } = render(
474473
<Select mode="combobox" value="" onChange={onChange}>
@@ -479,12 +478,16 @@ describe('Select.Combobox', () => {
479478

480479
toggleOpen(container);
481480
selectItem(container);
481+
jest.runAllTimers();
482482
expect(onChange).toHaveBeenCalled();
483483
expectOpen(container, false);
484484

485-
expect(container.querySelector('input')!.value).toEqual('');
485+
expect(container.querySelector('input')!).toHaveValue('');
486+
jest.useRealTimers();
486487
});
487488

489+
return;
490+
488491
it('should keep close after blur', async () => {
489492
const { container } = render(
490493
<Select mode="combobox" notFoundContent={null}>

0 commit comments

Comments
 (0)