It seems you cannot provide a custom placeholder
text in lookup fields while using lightning:inputField
.
Even though the component is rendered as an input type=text
with a placeholder
attribute you can't override the attribute.
As an example, if I provide something as below:
<lightning:inputField fieldName="AccountId" aura:id="aId"/>
I can see this rendered as below (removed other attributes) with the placeholder
attribute in there:
<input id="input-4" type="text" placeholder="Search Accounts..." class="slds-input slds-combobox__input slds-input-has-icon_group-right">
However if I provide the placeholder
attribute something as below (the compiler does not complain), but it never works and that the placeholder
attribute always had "Search Accounts..." in there and was never overridden.
<lightning:inputField fieldName="AccountId" aura:id="aId" placeholder="My Text"/>