From 32dbb7904b491513c9b74d3046df687bb3753b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 23 May 2019 21:03:13 +0800 Subject: [PATCH] [bugfix] AddressList: select-disabled event not triggered --- packages/address-list/Item.tsx | 10 +++++----- packages/address-list/index.tsx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/address-list/Item.tsx b/packages/address-list/Item.tsx index a3ddeab34..7fa861cf6 100644 --- a/packages/address-list/Item.tsx +++ b/packages/address-list/Item.tsx @@ -36,11 +36,11 @@ function AddressItem( ) { const { disabled, switchable } = props; - const onSelect = () => { - if (props.switchable) { + function onSelect() { + if (switchable) { emit(ctx, 'select'); } - }; + } const renderRightIcon = () => ( {data.address} ]; - return props.switchable ? ( + return switchable && !disabled ? ( {Info} @@ -73,7 +73,7 @@ function AddressItem( { emit(ctx, disabled ? 'select-disabled' : 'select', item, index); }}