I'm trying to enable a button when a field changes in my lightning component but I keep getting the error [component.find(...).getElement is not a function].
this is my component:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes"
access="global">
<div class="slds-form-element">
<div class="slds-form-element__control">
<lightning:input aura:id="color" type="color" label="Pick a Color" name="color" value="#EEEEEE" onchange="{! c.colorChanged }"/>
</div>
</div>
<br/>
<div class="slds-form-element">
<div class="slds-form-element__control">
<lightning:button aura:id="colorButton" label="Submit" disabled="true"/>
</div>
</div>
</aura:component>
and here is my controller... should be pretty straightforward.
({
colorChanged: function(component, event, helper){
var button = component.find('colorButton').getElement();
button.set('v.disabled', false);
},
})
any help is highly appreciated