Skip to content

Commit

Permalink
cleanup: remove unused property from computed watchlist
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasnys committed Jul 23, 2024
1 parent a896e0c commit e6bf89b
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions addon/-private/collapse-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,20 @@ export const TableRowMeta = EmberObject.extend({
}),

// eslint-disable-next-line ember/use-brace-expansion
isSelected: computed(
'_tree.{selection.[],selectionMatchFunction}',
'_parentMeta.isSelected',
function() {
let rowValue = get(this, '_rowValue');
let selection = get(this, '_tree.selection');
let selectionMatchFunction = get(this, '_tree.selectionMatchFunction');

if (isArray(selection)) {
return this.get('isGroupSelected');
}
isSelected: computed('_tree.{selection.[],selectionMatchFunction}', function() {
let rowValue = get(this, '_rowValue');
let selection = get(this, '_tree.selection');
let selectionMatchFunction = get(this, '_tree.selectionMatchFunction');

let isRowSelection = selectionMatchFunction
? selectionMatchFunction(selection, rowValue)
: selection === rowValue;
return isRowSelection || get(this, '_parentMeta.isSelected');
if (isArray(selection)) {
return this.get('isGroupSelected');
}
),

let isRowSelection = selectionMatchFunction
? selectionMatchFunction(selection, rowValue)
: selection === rowValue;
return isRowSelection || get(this, '_parentMeta.isSelected');
}),

isGroupSelected: computed(
'_tree.{selection.[],selectionMatchFunction}',
Expand Down

0 comments on commit e6bf89b

Please sign in to comment.