You need to sign in to do that
Don't have an account?
Yuvaraj Palani
Data Table not Responsive inside Lightning Layout LWC
I'm trying to use a Lighting Data Table inside lightning Layout. But the Data table loses its responsiveness.
Here is my code.
Is this a bug with Salesforce or I'm missing something ?
Here is my code.
<lightning-layout> <lightning-layout-item> <lightning-datatable key-field="Id" data={records} columns={columns} errors={errors}> </lightning-datatable> </lightning-layout-item> <lightning-layout-item> <template if:true={showListManage}> <c-team-record-list-view-manage current-list-view={currentListViewData} list-action-type={selectedListAction} onlistsuccess={handleListSuccess}> </c-team-record-list-view-manage> </template> </lightning-layout-item> </lightning-layout>
Is this a bug with Salesforce or I'm missing something ?
please specify the size in the lightning-layout-item to fit the datatable on to your screen width:
<lightning-layout-item size="12" >
<lightning-datatable key-field="Id" data={records} columns={columns} errors={errors}> </lightning-datatable>
</lightning-layout-item>
Not sure, but you can try passing a variable inside size attribute of the lightning-layout-item and set per your requirement in the JS file.