Tuesday, July 9, 2019

playing with force:inputField - addressing rendering issue and hiding new option from the look up drop down

As we know we do have a limitation on lookup fields in lightning components and if we don't want to go for custom component force:inputFueld is one option.

We have 2 very core limitation on that 

1. Conditional rendering of the field 
2. Hiding the new action

To resolve the #1 wrap force:inputField with <aura:renderIf > instead of aura:if so that revaluation of the rendering logic happen again


To address #2 we need a CSS trick, please add below CSS to your component to hide the New Record option as it does not obey the action override. 

.THIS.createNew{
    display : none !important;
}

No comments:

Post a Comment

Tips on passing Salesforce AI Associate Certification

  🌟 Motivation to Pursue the Salesforce AI Associate Certification 🌟 The world of technology is in a state of perpetual evolution, and on...