[SalesForce] lightning-record-edit-form look up filter

<lightning-record-edit-form object-api-name="Contact">
       <lightning-input-field field-name='AccountId' value="xxxxx"></lightning-input-field>
       <lightning-input-field field-name='LookUpFilter__c' ></lightning-input-field>

</lightning-record-edit-form>

The look up filter doesn't fetch any values even though "AccountId" is set, which is the basis for filtering look up records. Whats the best way to achieve this.

Best Answer

As you've observed, the built-in component needs a record to work with. However, there are open source versions (try searching for "lwc lookup field github") that you could modify to work without a record.

Check out this-

https://github.com/amitghadage/Lwc-Lookup-

And follow this for your Reference --

https://developer.salesforce.com/docs/component-library/bundle/lightning-input-field/documentation