0

i have one title "Test ABC" and when i click on it , nothing happens , mean it's not redirecting to anywhere , so basically this title is working as hyperlink , and i wanna make this hyperlink inactive , means it should only appear as title and not link , i have used lightning:accordion in aura components , so what change i need to make in code to do this changes (make it appear as Title not hyperlink)

<lightning:layout>                       
    <lightning:layoutItem padding="around-small" flexibility="auto">                     
         <lightning:accordion aura:id="TestABC" activeSectionName="TestABC">                         
             <lightning:accordionSection name="TestABC" label="Test ABC">                             
                  <aura:set attribute="body">                                 
                      <div class="slds-box">                                     
                           <li>                                                                             
                               <aura:if isTrue="some code">                                               
                                   <aura:if isTrue="{!v.something'}">                                                 
                                       <lightning:button  some code/>                                             
                                   </aura:if>                                          
                               </aura:if>                                         
                               <aura:iteration items=some code >                                             
                                    <li><lightning:button some code"/></li>                                         
                               </aura:iteration>                                             
                           </li>                                 
                      </div>                             
                </aura:set>                         
           </lightning:accordionSection>                    
        </lightning:accordion>                 
      </lightning:layoutItem>

#Salesforce Developer# #Salesforce #Lightning #Aura Components

1
  • By the way, this is an X-Y Problem. You really should be asking about designing what it is you want to design, and not trying to make a component work in a way it is not meant to work.
    – sfdcfox
    Commented Jun 29, 2022 at 14:54

1 Answer 1

0

If you want to allow the title to collapse the section, use the allowMultipleSectionsOpen="true" attribute:

<lightning:accordion aura:id="TestABC" activeSectionName="TestABC" allowMultipleSectionsOpen="true">                         

Otherwise, consider not using lightning:accordion; it's not made to be used in the way you're trying to use it. You might be interested in lightning:card or something else.

1
  • It's not working , This TestABC is appearing as link on UI (clickable ,blue and underlined , just like link) , i want it appear as text only , like below , here A , B , C are multiple options under TestABC , i want TestABC as title and not link TestABC /new line A /new line B /new line C
    – NMS
    Commented Jun 30, 2022 at 8:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .