Skip to content

Instantly share code, notes, and snippets.

@justin-lyon
Last active July 2, 2020 02:48
Show Gist options
  • Save justin-lyon/3b4ad91d9ae8a2565ee81d9db060dbf9 to your computer and use it in GitHub Desktop.
Save justin-lyon/3b4ad91d9ae8a2565ee81d9db060dbf9 to your computer and use it in GitHub Desktop.

Bug in LWC Specialist, Challenge 4

Error screen cap, followed by code sample.

Completing LWC Trailhead challenges is incredibly painful when your style guide doesn't match the Challenge's.

challeng error

  // Fires event that the search option has changed.
  // passes boatTypeId (value of this.selectedBoatTypeId) in the detail
  // eslint-disable-next-line space-before-function-paren
  handleSearchOptionChange(event) {
    // Create the const searchEvent
    // searchEvent must be the new custom event search

    this.selectedBoatTypeId = event.detail.value
    const searchEvent = new CustomEvent('search', {
      detail: { boatTypeId: this.selectedBoatTypeId }
      // eslint-disable-next-line semi
    });
    this.dispatchEvent(searchEvent)
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment