Is it possible to use Lightning Datatable with some random data (not any sobject data). I have been trying and am able to get the headers right but not the data. Data is always null.


I am assuming your question is:

The data table header looks all good, but data cannot be loaded into the table. If it is lwc, here is the example: https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/example

They have an api for some sample data retrieve. sobject data or not, lwc just mapping the json attributes with your column fieldName.

If it is lightning component, you can import mock library. Example here: https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.