You need to sign in to do that
Don't have an account?
Vardan Minasyan 9
Creating autocomplete textbox in Lighting Web Components
Hi!
I want to use/create an autocomplete textbox using Lightning Web Components. Particularly, I want an autocomplete textbox for looking up a PriceBookEntry2 so that I can add a product to an opportunity, on the same page as Opportunity.
I see options for autocomplete textbox for Visual Force, for Aura Lightning. However, I can't find anything for Lightning Web Components.
I do see Lightning-Input (https://developer.salesforce.com/docs/component-library/bundle/lightning-input/example), but I don't know how to make it an autocomplete type.
What's the best way to go about it?
The final result needs to be an opportunity form, where a person can add/edit/delete products on the same page.
I want to use/create an autocomplete textbox using Lightning Web Components. Particularly, I want an autocomplete textbox for looking up a PriceBookEntry2 so that I can add a product to an opportunity, on the same page as Opportunity.
I see options for autocomplete textbox for Visual Force, for Aura Lightning. However, I can't find anything for Lightning Web Components.
I do see Lightning-Input (https://developer.salesforce.com/docs/component-library/bundle/lightning-input/example), but I don't know how to make it an autocomplete type.
What's the best way to go about it?
The final result needs to be an opportunity form, where a person can add/edit/delete products on the same page.
You can try implementing this lookup comp
All Answers
You can try implementing this lookup comp
Thanks for the link - that's what I was looking for!
Can we use the same iwth the Custom Setting ?
Instead of @api objectName = 'Account'; @api fieldName = 'Name'; ?
How to search JSON as per the input passed by user in LWC
I have a JSON and I need to search the JSON based on the input entered by the user. E.g if User has passed 12, so all the codes matching the 12 in the JSON should be displayed. Can anyone let me know:
{
"test': {
"Code" : [
{
"Name" : "test 1",
"Location" : "India",
"Code" : "1211"
},
{
"Name" : "test 2",
"Location" : "U.K",
"Code" : "1233",
{
"Name" : "test 3",
"Location" : "U.S.A",
"Code" : "1239"
JS:
I have parsed the JSON and stored it in the variable : areacodeDetails
var currentText = event.target.value;
this.areacodeDetails.forEach(area => {
if(currentText.length > 0){
// Need to know how to filter in that JSON