fix(data-table): forgo "click", "click:row" events if target is a checkbox, radio button (#951)

Fixes #933
This commit is contained in:
Eric Liu 2021-12-28 13:26:09 -08:00 committed by GitHub
commit ae96fdf3d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -337,10 +337,11 @@
? 'bx--expandable-row--hover' ? 'bx--expandable-row--hover'
: ''}" : ''}"
on:click="{({ target }) => { on:click="{({ target }) => {
// forgo "click", "click:row" events if target resembles an overflow menu // forgo "click", "click:row" events if target
// resembles an overflow menu, a checkbox, or radio button
if ( if (
[...target.classList].some((name) => [...target.classList].some((name) =>
/^bx--overflow-menu/.test(name) /^bx--(overflow-menu|checkbox|radio-button)/.test(name)
) )
) { ) {
return; return;