File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
66import { css , html , LitElement } from 'lit' ;
77import { queryAssignedElements } from 'lit/decorators.js' ;
88
9- import { UUITableCellElement } from './uui-table-cell.element' ;
10-
119/**
1210 * Table row element with option to set is as selectable. Parent for uui-table-cell. Must be a child of uui-table.
1311 * @element uui-table-row
@@ -50,13 +48,15 @@ export class UUITableRowElement extends SelectOnlyMixin(
5048 private slotCellNodes ?: unknown [ ] ;
5149
5250 protected updated ( changedProperties : Map < string | number | symbol , unknown > ) {
53- if ( changedProperties . has ( 'selectOnly' ) ) this . updateChildSelectOnly ( ) ;
51+ if ( changedProperties . has ( 'selectOnly' ) ) {
52+ this . updateChildSelectOnly ( ) ;
53+ }
5454 }
5555
5656 private updateChildSelectOnly ( ) {
5757 if ( this . slotCellNodes ) {
58- this . slotCellNodes . forEach ( el => {
59- if ( el instanceof UUITableCellElement ) {
58+ this . slotCellNodes . forEach ( ( el : any ) => {
59+ if ( el . disableChildInteraction !== undefined ) {
6060 el . disableChildInteraction = this . selectOnly ;
6161 }
6262 } ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import { html } from 'lit';
44import type { Meta , StoryObj } from '@storybook/web-components' ;
55import { ArrayOfUmbracoWords } from '../../../storyhelpers/UmbracoWordGenerator' ;
66
7+ import '@umbraco-ui/uui-table' ;
8+ import '@umbraco-ui/uui-input' ;
9+ import '@umbraco-ui/uui-button' ;
10+
711const meta : Meta = {
812 id : 'uui-table-row' ,
913 component : 'uui-table-row' ,
@@ -12,14 +16,14 @@ const meta: Meta = {
1216 < uui-table >
1317 < uui-table-row
1418 ?selectable =${ args . selectable }
15- ?selectOnly =${ args . selectOnly } >
19+ ?select-only =${ args . selectOnly } >
1620 ${ ArrayOfUmbracoWords ( 5 ) . map (
1721 el => html `< uui-table-cell > ${ el } </ uui-table-cell > ` ,
1822 ) }
1923 </ uui-table-row >
2024 < uui-table-row
2125 ?selectable =${ args . selectable }
22- ?selectOnly =${ args . selectOnly } >
26+ ?select-only =${ args . selectOnly } >
2327 < uui-table-cell >
2428 < uui-input placeholder ="Type your own thing "> </ uui-input >
2529 </ uui-table-cell >
You can’t perform that action at this time.
0 commit comments