0

I currently have a LWC in which I render a table with a custom LWC lookup field. How can I make this lookup field uneditable. Is there a syntax or CSS is can use to accomplish this since I currently also use this component when adding new rows to the table

My Current component looks like

  <td data-label="Name">
                                        <c-custom-lookup-lwc icon-name="standard:user" s-object-api-name="user" label=""
                                            default-record-id={oppSpl.SplitOwnerId} placeholder="Search People..." slds-button="false">
                                        </c-custom-lookup-lwc>
                                        </td>

Thanks in advance

2 Answers 2

1

Go to the customLookup component and check whether you find the "input" element inside that. Add the "disabled" attribute to that and pass the "true/false" from parent component or if you need to disabled it always set as disabled="true" .

1
  • Thanks for you answer. This solution seems not to be applicable for a lookup field and has been reported as an issue.
    – Thomas
    Oct 17, 2022 at 8:46
0

I ended up with doing a soql with SplitOwner.Name and in template simply do {oppSpl.SplitOwner.Name}

You must log in to answer this question.

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