function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ken KoellnerKen Koellner 

Expense example a href hyperlink and update action going to expense page layout

I noticed when I got the event working on the Expense example that clicking the check box did save the data, but it also when to the page layout for the expense record.  I'm not sure why the code had the <a> tag span all the fields in the expense record.  I changed my example code to move the </a> up to just cover the name.

Anyeone else notice this behavior and have an opinion as to whether this is the correct fix?
<div class="{!v.expense.learn2turn__reimbursed__c == true 
                   ? 'listRecord recordLayout blue' : 'listRecord recordLayout white'}">
    <a aura:id="expense" href="{!'/' + v.expense.id}">
      <div class="itemTitle">{!v.expense.name}</div>
    </a>
      <div class="recordItem">Amount: 
          <ui:outputNumber 
           value="{!v.expense.learn2turn__amount__c}" format=".00"/>
      </div>
      <div class="recordItem">Reason: 
          <ui:outputText 
           value="{!v.expense.learn2turn__Reason__c}"/>
      </div>
      <div class="recordItem">Date: 
          <ui:outputDateTime
           value="{!v.expense.learn2turn__date__c}" />
      </div>
      <div class="recordItem">Reimbursed? 
          <ui:inputCheckbox 
           value="{!v.expense.learn2turn__processed__c}" click="{!c.myUpdate}"/>
      </div>
  </a>
  </div>

 
SkipSaulsSkipSauls
I didn't write the sample, but one reason for doing things like this is that an entire row, card, etc. becomes actionable, so you don't have to click on a specific link.