You need to sign in to do that
Don't have an account?

Depending on first LWC Component fields,second LWC Component has to display the list of records
Hi All,
I am new to LWC and have a requirement.Based on the values entered by user in first LWC Component.display the list of records in second LWC Component.
I am trying to acheive this by making second one as Parent Component and first one as Child Component.
I need to make use of Event to pass the values entered by the user to run a SOQL query which will fetch the matching records available in the database.
How to write Event Code for this and also Apex class?
Please help me!!!
I am new to LWC and have a requirement.Based on the values entered by user in first LWC Component.display the list of records in second LWC Component.
I am trying to acheive this by making second one as Parent Component and first one as Child Component.
I need to make use of Event to pass the values entered by the user to run a SOQL query which will fetch the matching records available in the database.
How to write Event Code for this and also Apex class?
Please help me!!!
Try Below Code Please Mark It As Best Answer If It Helps
Thank You!
All Answers
Try Below Code Please Mark It As Best Answer If It Helps
Thank You!
Thanks a lot for replying.It was really helpful for me.
I am getting this error while compiling:
No MODULE named markup://c:recordList found : [markup://c:hotelListingComponent]
Can you please share recordList component code?
Thanks
save child component by this name 'recordList'
Hi Charu Dutt,
I got Compilation Failure message when I am Deploying the Source to Org saying
Compilation Failure: cannot resolve the entry for c:\recordlist\recordList.js
Before getting this message there were no syntax errors in both parent and child components and compiled well.
I have checked for the spelling mistakes etc in the Child Component file name recordList.
please help me fix this.
Thanks