列中按钮点击事件如何阻止冒泡

场景描述

表格的行点击事件中做了操作,表格列的按钮点击事件中也做了操作,在点击按钮执行相关的操作时需要阻止执行行点击事件中的操作

实现思路

在按钮点击事件中实现阻止冒泡

具体实现

在按钮事件中控制阻止冒泡的实现如下:

    onButton0Click = ({row}) => (event) => {
        var name = row.name;
        console.log(name);
        event.stopPropagation();
    }

results matching ""

    No results matching ""

    results matching ""

      No results matching ""