4

As you know, datatables do not support lookup field. I've built a search lookup field that queries an object, and added that to the LWC datatable as a custom type.

  • The id of the selected record (Product Name column in the image below) is propagated to the datatable component
  • I'm trying to turn that id into a draft value so I can mass update both product name and quantity (refer to image below) using the save function.

Anyone has done something similar before? Willing to share your solution or code snippet, specifically for Lightning Web Component? Anything is helpful at this point.

Image Reference

enter image description here

Appreciate any help on this matter. Thanks all.

-1

You need to update draft values while updating the lookup. Please check https://live.playg.app/play/lookup-in-lightning-datatable-lwc

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.