From b8f1f2ec079275280bbbe5bc94655191cf7a83ea Mon Sep 17 00:00:00 2001 From: John Ryan Camatog Date: Fri, 23 Jun 2017 00:48:14 +0800 Subject: [PATCH] Fix #851 --- src/components/mdList/mdListItem.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/mdList/mdListItem.js b/src/components/mdList/mdListItem.js index e2f100f..29af19e 100644 --- a/src/components/mdList/mdListItem.js +++ b/src/components/mdList/mdListItem.js @@ -12,7 +12,7 @@ export default { }, render(createElement, { children, data, props }) { const getItemComponent = () => { - const nativeOn = data.nativeOn; + const on = data.on; const interactionEvents = [ 'contextmenu', 'dblclick', @@ -27,16 +27,6 @@ export default { return MdListItemLink; } - if (nativeOn) { - let counter = interactionEvents.length; - - while (counter--) { - if (nativeOn[interactionEvents[counter]]) { - return MdListItemButton; - } - } - } - while (childrenCount--) { const options = children[childrenCount].componentOptions; @@ -59,6 +49,16 @@ export default { } } + if (on) { + let counter = interactionEvents.length; + + while (counter--) { + if (on[interactionEvents[counter]]) { + return MdListItemButton; + } + } + } + return MdListItemDefault; };