1

I have a custom datatable which contains a custom lookup component.

(Custom lookup component is from: https://lwcfactory.com/custom-lookup-salesforce-lwc/)

I put it inside of my custom datatable, and it works perfectly fine but the search dropdownlist doesn't extend out of datatable boundary.

enter image description here

I inserted a few blank labels to extend the row height forcefully so that it can show all of its search results.

Otherwise it goes like this:

enter image description here

How do I fix it?

I tried to add 'overflow:visible' to all over the related places but it turned out to be not working.

=== CODE OF MY CUSTOM DATATABLE ===

// cdlookupComp.html
<template>
    <c-cdlookup-comp record-id={value}>
    </c-cdlookup-comp>
</template>
// cdcustomDatatable.js
import LightningDatatable from 'lightning/datatable';
import cdlookupComp from './cdlookupComp.html';

export default class CdcustomDatatable extends LightningDatatable {
    static customTypes = {
        customLookup: {
            template: cdlookupComp
        }
    };
}
// cdlookupComp.html
<template>
    <c-custom-lookup-lwc label={label}
                         icon-name={iconName}
                         s-object-api-name={sObjectApiName}
                         default-record-id={defaultRecordId}>
    </c-custom-lookup-lwc>
</template>
2
  • Hi and welcome to SFSE. You need to do this by providing a self-answered Q&A, not a question that also includes the solution. You can then set your answer as the best answer to register the question as solved (we don't say "SOLVED" in the summary).
    – Phil W
    Commented Dec 13, 2022 at 8:40
  • @PhilW Hi, duly noted :) Commented Dec 14, 2022 at 0:59

1 Answer 1

0

I solved it by using loadStyle and CSS (static resource). See https://getoncrm.com/how-to-override-css-of-inner-elements-of-lightning-web-component/

2
  • This answer would be better (and proof against the given link becoming invalid in future) if you at least summarised the set of steps applied directly here. SFSE policy is to avoid link only answers. You have at least given a bit of extra info, but it would be better with more detail.
    – Phil W
    Commented Dec 14, 2022 at 7:16
  • can you provide more details? Commented Dec 7, 2023 at 16:27

You must log in to answer this question.

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