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
Ramya BalakrishnanRamya Balakrishnan 

trying to create lightning data table component in Visual studio code

Hi all

The following error is showing while trying to create lightning data table component in Visual studio code. Please suggest how to resolve this. Thanks.
    <h1 style="height: 30px;font-size:14px;background-color:#F4F4F4;padding-left:10px; text-align:left;font-weight: bold;">
        Sales(Year over Year)
 <div style="height: 300px;">


User-added image
AnkaiahAnkaiah (Salesforce Developers) 
Hi Ramya,

Refer the below link have an example how to created LWC data table.

If this helps, Please mark it as best answer.

Ramya BalakrishnanRamya Balakrishnan
I have referred this link. But the error I am getting is that data table is not supported in mobile device. I don't  need to use that data table in mobile. How to avoid this error?
mukesh guptamukesh gupta
Hi Ramya,

Please try with
<lightning-datatable class="slds-max-medium-table_stacked" >

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.