0

Hi I have created the lightning input box which contains some value as a drop down but when i am clicking outside of the drop down anywhere on the page the values which are appearing as a drop down is not getting closed.

   <lightning-input label='testSearch' onfocus={handleoneItem} onchange={handleOneItem}
                                onkeydown={handle2item} value={testaccountNu} type='search'
                                maxlength='100' 
                                placeholder='Select test ' 
                                 class='slds-combobox__input'>
                            </lightning-input>
6
  • Allen for creating a dropdown the right component would be combobox. – manjit5190 May 4 '20 at 5:20
  • Yes i know but as per req. i need to create the custom one. – Allen May 4 '20 at 5:26
  • Then I would suggest using the select tag of HTML which is explicitly for creating dropdown and the behaviour is handled by the browser. – manjit5190 May 4 '20 at 5:28
  • select will not support other methods of lighting..!! – Allen May 4 '20 at 5:34
  • is there anyway i can shift focus to another field on click of the mouse or click of the dropdown – Allen May 4 '20 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.