Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<YieldSlot @name="details"><div class="detail">{{yield cell.item cell.index}}</div></YieldSlot>
<YieldSlot @name="actions"
@params={{
block-params (component 'more-popover-menu' expanded=(if (eq checked cell.index) true false) onchange=(action "change" cell.index))
block-params (component 'more-popover-menu' expanded=(if (eq checked cell.item.uid) true false) onchange=(action "change" cell.item.uid))
}}
>
<div class="actions">
Expand All @@ -51,13 +51,13 @@
<li
data-test-list-row
onclick={{action 'click'}}
class={{if (not linkable) 'linkable' (if (is linkable item=cell.item) 'linkable')}}
class={{if (not linkable) 'linkable' (if (is linkable item=item) 'linkable')}}
>
<YieldSlot @name="header"><div class="header">{{yield item index}}</div></YieldSlot>
<YieldSlot @name="details"><div class="detail">{{yield item index}}</div></YieldSlot>
<YieldSlot @name="actions"
@params={{
block-params (component 'more-popover-menu' onchange=(action "change" index))
block-params (component 'more-popover-menu' onchange=(action "change" item.uid))
}}
>
<div class="actions">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default Component.extend(Slotted, {
const o = this;
this['cell-layout'].formatItemStyle = function (itemIndex) {
let style = formatItemStyle.apply(this, arguments);
if (o.checked === itemIndex) {
const items = get(o, 'items');
if (items && items[itemIndex] && o.checked === items[itemIndex].uid) {
style = `${style};z-index: 1`;
}
return style;
Expand Down Expand Up @@ -75,7 +76,7 @@ export default Component.extend(Slotted, {
},
change: function (index, e = {}) {
if (e.target.checked && index !== this.checked) {
set(this, 'checked', parseInt(index));
set(this, 'checked', index);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test to cover this behaviour?

this.$row = this.dom.closest('li', e.target);
this.$row.style.zIndex = 1;

Expand Down
Loading