You need to sign in to do that
Don't have an account?
victor verma 1
lwc superbadge step 9 error
Challenge Not yet complete... here's what's wrong:
We can't find the correct boatTypeId variable setting in the searchBoats method in the component boatSearch JavaScript file. Make sure the variable and method were created according to the requirements.
We can't find the correct boatTypeId variable setting in the searchBoats method in the component boatSearch JavaScript file. Make sure the variable and method were created according to the requirements.
import { LightningElement } from 'lwc'; import { NavigationMixin } from 'lightning/navigation'; export default class BoatSearch extends NavigationMixin(LightningElement) { isLoading = false; boatTypeId; // Handles loading event handleLoading() { this.isLoading = true; } // Handles done loading event handleDoneLoading() { this.isLoading = false; } // Handles search boat event // This custom event comes from the form searchBoats(event) { this.boatTypeId = event.detail.boatTypeId; this.template.querySelector('c-boat-search-results').searchBoats(this.boatTypeId); } } createNewBoat() { this[NavigationMixin.Navigate]({ type: 'standard__objectPage', attributes: { objectApiName: 'Boat__c', actionName: 'new', }, }); } }
We have a separate Trailhead team who can help you with these issues. So, can you please use the below link to reach out to them so that one of the agent will get in touch with you.
Support:https://trailhead.salesforce.com/help
Thank you!
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks,
Vinay Kumar
boatSearch.js
import { LightningElement , track ,api} from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
// imports
export default class BoatSearch extends NavigationMixin(LightningElement) {
@track isLoading = true;
handleLoading()
{
this.isLoading = true;
}
handleDoneLoading()
{
this.isLoading = false;
}
createNewBoat() {
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
objectApiName: 'Boat__c',
actionName: 'new'
}
});
}
searchBoats(event)
{
this.boatTypeId = event.detail.boatTypeId;
this.template.querySelector('c-boat-search-results').searchBoats(this.boatTypeId);
}
}