Skip to content

Instantly share code, notes, and snippets.

@choudharymanish8585
Created February 14, 2019 20:46
Show Gist options
  • Save choudharymanish8585/cb28b659c97818be1d551339af17fe51 to your computer and use it in GitHub Desktop.
Save choudharymanish8585/cb28b659c97818be1d551339af17fe51 to your computer and use it in GitHub Desktop.
<aura:component controller="CarTypeSearch"
implements="force:appHostable,flexipage:availableForRecordHome,force:hasRecordId">
<!-- Attribute to controle visibility of New button -->
<aura:attribute name="showNew" type="boolean" />
<aura:attribute name="carTypes" type="Car_Type__c[]"/>
<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
<!-- This event will be fired when user will click on
search button and will selected carTypeId-->
<aura:registerEvent name="searchFormSubmit" type="c:SearchFormSubmitEvent" />
<lightning:layout horizontalAlign="center">
<lightning:layoutItem>
<lightning:select name='selectItem' aura:id="carType" label='All Types'
variant="label-hidden" value="">
<option value="" text="All Types" />
<option value="" text="Sports Car" />
<option value="" text="Luxury Car" />
</lightning:select>
</lightning:layoutItem>
<lightning:layoutItem padding="around-medium">
<lightning:button label="Search" variant="brand" onclick="{!c.onFormSubmit}"/>
<lightning:button variant='neutral' label='New' onclick="{!c.createRecord}"/>
</lightning:layoutItem>
</lightning:layout>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment