1

Getting the below error while trying to create a data table using the link -https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example

Failed to save ListView.cmp: No MODULE named mockdataFaker found: Source

code cmp-

<aura:component >
    <aura:import library="lightningcomponentdemo:mockdataFaker" property="mockdataLibrary"/> 
    <aura:attribute name="data" type="Contact"/>
    <aura:attribute name="columns" type="List"/>  
    
    <aura:handler name="init" value="{! this}" action ="{!c.this}"/>
    <div style="height: 300px">
        <lightning:datatable
                             keyField="id"
                             data="{! v.data }"
                             columns="{! v.columns }"
                             hideCheckboxColumn="true"
                             onrowselection="{! c.getSelectedName }"/>
    </div>
</aura:component>

1 Answer 1

0

Already discussed here. Please go through the discussion.

2
  • I didn't understand the solution provided
    – Gxdev
    Mar 10, 2021 at 11:04
  • <aura:import> is not part of the standard lightning library, so we will not be able to use it. Mar 11, 2021 at 15:30

You must log in to answer this question.

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