[bugfix] AddressList: select event triggered twice

This commit is contained in:
陈嘉涵 2019-06-01 10:29:31 +08:00
parent df275a0168
commit 6132cb527a
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ function AddressItem(
];
return switchable && !disabled ? (
<Radio name={data.id} iconSize={16} checkedColor={RED} onClick={onSelect}>
<Radio name={data.id} iconSize={16} checkedColor={RED}>
{Info}
</Radio>
) : (

View File

@ -42,5 +42,5 @@ test('select event', () => {
wrapper.find('.van-radio__icon').trigger('click');
expect(onSelect).toHaveBeenCalled();
expect(onSelect).toHaveBeenCalledTimes(1);
});