File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
packages/uui-base/lib/mixins Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -95,19 +95,15 @@ export const SelectableMixin = <T extends Constructor<LitElement>>(
9595
9696 readonly #onClick = ( e : Event ) => {
9797 const composePath = e . composedPath ( ) ;
98+ const isSelectable =
99+ this . _selectable || ( this . deselectable && this . selected ) ;
98100
99- if (
100- ( this . _selectable || ( this . deselectable && this . selected ) ) &&
101- this . selectableTarget === this
102- ) {
101+ if ( isSelectable && this . selectableTarget === this ) {
103102 this . #toggleSelect( ) ;
104103 return ;
105104 }
106105
107- if (
108- ( this . _selectable || ( this . deselectable && this . selected ) ) &&
109- composePath . indexOf ( this . selectableTarget ) === 0
110- ) {
106+ if ( isSelectable && composePath . indexOf ( this . selectableTarget ) === 0 ) {
111107 this . #toggleSelect( ) ;
112108 }
113109 } ;
You can’t perform that action at this time.
0 commit comments