diff --git a/.eslintrc b/.eslintrc index f915fe136..0a3300a9b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -33,7 +33,10 @@ "@typescript-eslint/explicit-module-boundary-types": 0, "@typescript-eslint/no-empty-function": 0, "@typescript-eslint/no-non-null-assertion": 0, - "@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": true }] + "@typescript-eslint/no-unused-vars": [ + "error", + { "vars": "all", "args": "after-used", "ignoreRestSiblings": true } + ] } } ], diff --git a/antdv-demo b/antdv-demo index 4f6ebd031..68644e795 160000 --- a/antdv-demo +++ b/antdv-demo @@ -1 +1 @@ -Subproject commit 4f6ebd03190812369678c4dd383fdb4e98d6f6c1 +Subproject commit 68644e7953c739fe64bfbe458f158fcd1d924872 diff --git a/components/select/__tests__/index.test.js b/components/select/__tests__/index.test.js index 016febebb..f083bffe0 100644 --- a/components/select/__tests__/index.test.js +++ b/components/select/__tests__/index.test.js @@ -37,16 +37,12 @@ describe('Select', () => { attachTo: 'body', }); await asyncExpect(() => { - wrapper - .findAll('.ant-select-selector')[0] - .element.dispatchEvent(new MouseEvent('mousedown')); + wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown')); }); await asyncExpect(() => { expect($$('.ant-select-item-option').length).toBe(0); - expect($$('.ant-empty-description')[0].innerHTML).toBe( - 'No Data', - ); + expect($$('.ant-empty-description')[0].innerHTML).toBe('No Data'); }, 100); }); @@ -60,9 +56,7 @@ describe('Select', () => { attachTo: 'body', }); await asyncExpect(() => { - wrapper - .findAll('.ant-select-selector')[0] - .element.dispatchEvent(new MouseEvent('mousedown')); + wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown')); }); await asyncExpect(() => { @@ -79,9 +73,7 @@ describe('Select', () => { attachTo: 'body', }); await asyncExpect(() => { - wrapper - .findAll('.ant-select-selector')[0] - .element.dispatchEvent(new MouseEvent('mousedown')); + wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown')); }); await asyncExpect(() => { @@ -98,9 +90,7 @@ describe('Select', () => { sync: false, }); await asyncExpect(() => { - wrapper - .findAll('.ant-select-selector')[0] - .element.dispatchEvent(new MouseEvent('mousedown')); + wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown')); }); await asyncExpect(() => { @@ -135,11 +125,9 @@ describe('Select', () => { expect(getStyle($$('.ant-select-dropdown')[0], 'display')).toBe('block'); }, 100); await asyncExpect(() => { - wrapper - .findAll('.ant-select-selector')[0] - .element.dispatchEvent(new MouseEvent('mousedown')); + wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown')); }); - await asyncExpect(()=>{ + await asyncExpect(() => { expect(onDropdownVisibleChange).toHaveBeenLastCalledWith(false); }); await asyncExpect(() => { @@ -149,9 +137,7 @@ describe('Select', () => { await asyncExpect(() => { expect(getStyle($$('.ant-select-dropdown')[0], 'display')).toBe('none'); - wrapper - .findAll('.ant-select-selector')[0] - .element.dispatchEvent(new MouseEvent('mousedown')); + wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown')); expect(onDropdownVisibleChange).toHaveBeenLastCalledWith(true); expect(getStyle($$('.ant-select-dropdown')[0], 'display')).toBe('none'); }, 500); diff --git a/components/vc-tree-select/src/Base/BaseSelector.jsx b/components/vc-tree-select/src/Base/BaseSelector.jsx index f6a22aa13..62aa0b36e 100644 --- a/components/vc-tree-select/src/Base/BaseSelector.jsx +++ b/components/vc-tree-select/src/Base/BaseSelector.jsx @@ -104,7 +104,14 @@ export default function() { } const clearIcon = getComponent(this, 'clearIcon'); return ( -