I have ui:inputText component which is something like this:
<ui:inputText updateOn="keyup"
keyup="{!c.keyPressController}"
class="slds-input slds-combobox__input"
aura:id="comboBox"
value="{!v.searchKey}"
placeholder="{!v.placeholder}"/>
Is it possible to make it readonly something like this?
<input type="text" class="slds-input slds-combobox__input" readonly="" value="hello" />
Best Answer
You can use enhanced version of
ui:inputText
which is lightning:input. It hasreadonly
as attributeSame code can be written as