File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
packages/calcite-components/src/components/list-item Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -392,16 +392,19 @@ export class ListItem
392
392
const { el, open, openable, parentListEl } = this ;
393
393
const dir = getElementDir ( el ) ;
394
394
395
- return openable ? (
396
- < td class = { CSS . openContainer } key = "open-container" onClick = { this . toggleOpen } >
397
- < calcite-icon
398
- icon = { open ? ICONS . open : dir === "rtl" ? ICONS . closedRTL : ICONS . closedLTR }
399
- scale = "s"
400
- />
401
- </ td >
402
- ) : parentListEl ?. openable ? (
403
- < td class = { CSS . openContainer } key = "open-container" onClick = { this . itemClicked } >
404
- < calcite-icon icon = { ICONS . blank } scale = "s" />
395
+ const icon = openable
396
+ ? open
397
+ ? ICONS . open
398
+ : dir === "rtl"
399
+ ? ICONS . closedRTL
400
+ : ICONS . closedLTR
401
+ : ICONS . blank ;
402
+
403
+ const clickHandler = openable ? this . toggleOpen : this . itemClicked ;
404
+
405
+ return openable || parentListEl ?. openable ? (
406
+ < td class = { CSS . openContainer } key = "open-container" onClick = { clickHandler } >
407
+ < calcite-icon icon = { icon } key = { icon } scale = "s" />
405
408
</ td >
406
409
) : null ;
407
410
}
You can’t perform that action at this time.
0 commit comments