mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 18:36:51 +08:00
[bugfix] AddressList: select event triggered twice
This commit is contained in:
parent
df275a0168
commit
6132cb527a
@ -62,7 +62,7 @@ function AddressItem(
|
|||||||
];
|
];
|
||||||
|
|
||||||
return switchable && !disabled ? (
|
return switchable && !disabled ? (
|
||||||
<Radio name={data.id} iconSize={16} checkedColor={RED} onClick={onSelect}>
|
<Radio name={data.id} iconSize={16} checkedColor={RED}>
|
||||||
{Info}
|
{Info}
|
||||||
</Radio>
|
</Radio>
|
||||||
) : (
|
) : (
|
||||||
|
@ -42,5 +42,5 @@ test('select event', () => {
|
|||||||
|
|
||||||
wrapper.find('.van-radio__icon').trigger('click');
|
wrapper.find('.van-radio__icon').trigger('click');
|
||||||
|
|
||||||
expect(onSelect).toHaveBeenCalled();
|
expect(onSelect).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user