Skip to main content

#Trailhead Challenges1,657 discussing

Hands-on challenges are the “secret sauce” of Trailhead. Before searching for solutions to superbadge challenges, review the Salesforce Certification Program Agreement and Policies. ** NOTE ** : If you were able to get a response that solved your issue, please mark it as the 'Best Answer' to help other Trailblazers. If the issue persists after 48 hours, create a Trailhead Help case at https://help.salesforce.com/s/support for further assistance.

Challenge not yet complete in VS Code 

 

We can't find code that sets the 'annualRevenue' property to the 'value' of the lightning-input's change event. In the accountFinder JavaScript, make sure the event handler reads the 'value' from the change event.

import { LightningElement } from 'lwc';export default class AccountFinder extends LightningElement {    annualRevenue = null;    handleChange(event) {        this.annualRevenue = event.target.value;    }    reset() {        this.annualRevenue = null;        const input = this.template.querySelector('lightning-input');        if (input) {            input.value = null;        }    }}

 

<template>  <lightning-card title="Account Finder">    <lightning-input    type="number"    label="Annual Revenue"    formatter="currency"    value={annualRevenue}    onchange={handleChange}>    </lightning-input>    <lightning-button    label="Reset"    onclick={reset}>    </lightning-button>  </lightning-card></template>

 

<?xml version="1.0" encoding="UTF-8"?><LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">    <apiVersion>65.0</apiVersion>    <isExposed>true</isExposed>    <targets>        <target>lightning__AppPage</target>        <target>lightning__HomePage</target>        <target>lightning__RecordPage</target>    </targets></LightningComponentBundle>

 

 

 

#Trailhead Challenges

0/9000