You need to sign in to do that
Don't have an account?
shalini sharma 24
freezing the header in lightning:listview
Hi all.
I have a lightning component where i am using lightning:listview. Below is the code.
I want to fix the header of the listview. How can i achieve this?
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<lightning:listView aura:id="listViewAccounts"
objectApiName="object__c"
listName="Default"
rows="20"
showActionBar="true"
enableInlineEdit="false"
showRowLevelActions="true"
/>
</aura:component>
Thanks
I have a lightning component where i am using lightning:listview. Below is the code.
I want to fix the header of the listview. How can i achieve this?
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<lightning:listView aura:id="listViewAccounts"
objectApiName="object__c"
listName="Default"
rows="20"
showActionBar="true"
enableInlineEdit="false"
showRowLevelActions="true"
/>
</aura:component>
Thanks
All Answers
I dont see any standard thing to fix the header but i think using CSS you can do it.
i just tried and its working . just need to fix a little more css.
testCss static resource-
Thanks for reply
It doesn't seem to be working for me. My header i.e. column names are still not freezed. See below screenshots.
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<ltng:require
styles="{!$Resource.testCss}" />
<lightning:listView aura:id="listViewAccounts"
objectApiName="Account"
listName="Default"
rows="20"
showActionBar="true"
enableInlineEdit="false"
showRowLevelActions="true"
/>
</aura:component>
i removed stylesheet and put styles in component.style
Styles -
Thank you for folloeing up with my query.
I have got the header fixed. But still the column Names such as Account Name, Account Site are not yet freezed. I have been changing the css but nothing works out. You have any idea?
Thanks