# All files / my/sobjectDefinition sobjectDefinition.js

50% Statements 3/6
100% Branches 0/0
33.33% Functions 1/3
40% Lines 2/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
    32
    33
    34
    35

    2x

    40x

     /*
     * 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 SobjectDefinition extends LightningElement {
      @api
      oid = '';

      name = '';

      onChangeInput = (e) => {
        this.name = e.target.value;
        this.dispatchEvent(
          new CustomEvent('changesobj', {
            detail: {
              id: this.oid,
              name: this.name
            }
          })
        );
      };

      deleteRow = () => {
        this.dispatchEvent(
          new CustomEvent('deletesobj', {
            detail: this.oid
          })
        );
      };
    }