All files / my/propertyTargetItem propertyTargetItem.js

66.67% Statements 4/6
100% Branches 0/0
66.67% Functions 2/3
60% Lines 3/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31            2x   40x                                     30x      
/*
 * Copyright (c) 2021, salesforce.com, inc.
 * All rights reserved.
 * Licensed under the BSD 3-Clause license.
 * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
 */
import { LightningElement, api } from 'lwc';
 
export default class PropertyTargetItem extends LightningElement {
  @api
  target;
 
  isChecked = false;
 
  onChangeTargetCheckbox = (e) => {
    this.isChecked = e.currentTarget.checked;
    this.dispatchEvent(
      new CustomEvent('changepropitem', {
        detail: {
          target: this.target,
          isChecked: this.isChecked
        }
      })
    );
  };
 
  get targetId() {
    return `propTarget${this.target.value}`;
  }
}