diff --git a/examples/components/Form/Picker.jsx b/examples/components/Form/Picker.jsx index 4515ce1e1..73649a51a 100644 --- a/examples/components/Form/Picker.jsx +++ b/examples/components/Form/Picker.jsx @@ -41,7 +41,7 @@ export default { } ], onEvent: { - itemclick: { + itemClick: { actions: [ { actionType: 'alert', @@ -298,7 +298,7 @@ export default { ] }, onEvent: { - itemclick: { + itemClick: { actions: [ { actionType: 'alert', diff --git a/packages/amis-editor/src/plugin/Form/Picker.tsx b/packages/amis-editor/src/plugin/Form/Picker.tsx index 0b77a6c1d..b67444b88 100644 --- a/packages/amis-editor/src/plugin/Form/Picker.tsx +++ b/packages/amis-editor/src/plugin/Form/Picker.tsx @@ -82,7 +82,7 @@ export class PickerControlPlugin extends BasePlugin { ] }, { - eventName: 'itemclick', + eventName: 'itemClick', eventLabel: '点击选项', description: '选项被点击时触发', dataSchema: [ diff --git a/packages/amis/__tests__/renderers/Form/combo.test.tsx b/packages/amis/__tests__/renderers/Form/combo.test.tsx index da5119e33..92d3f3f9b 100644 --- a/packages/amis/__tests__/renderers/Form/combo.test.tsx +++ b/packages/amis/__tests__/renderers/Form/combo.test.tsx @@ -763,12 +763,13 @@ test('Renderer:combo with addable & addattop & addBtn & addButtonText & addButto fireEvent.click( container.querySelector('.addAtTopClass .cxd-Combo-toolbar button')! ); - await wait(10); - expect( - (container.querySelector( - '.addAtTopClass .cxd-Combo-item .cxd-TextControl-input input' - ) as HTMLInputElement)!.value - ).toBe(''); + await waitFor(() => { + expect( + (container.querySelector( + '.addAtTopClass .cxd-Combo-item .cxd-TextControl-input input' + ) as HTMLInputElement)!.value + ).toBe(''); + }); expect( container.querySelector('.addableClass .cxd-Combo-toolbar button')!