I have LWC component on Sales_Order__c Object where on click of new button i am opening this custom component and i have used a LWC Child Component say ReusableLookup to search Farmer or say Contact records. I want to add a custom button as 'Create New Farmer' under Search farmer, if Farmer Name is not found in Database and on this click of Create New Farmer Button i want open a pop up and allow a user to enter a details and let him save record and once a record is being saved that record should auto populate in search bar.Image 1 Image 2. You can see in Image 2 that i tried entering 'Tushar' in search farmers but I am not able to display new record button. and this button should not be by default visible, only visible when record is not found. Please help me to achieve this problem, i am new to Salesforce.
I have tried Creating a separate pop up and even tried to achieve this in using this pop in in child component and display it on basis of if true directive.