Questions tagged [lightning-combobox]

For questions related to the lightning combobox widget

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

lightning-combobox throwing error on selection

I have a lightning-combobox which gives the options to select a field from an fetched apex collection. The component loads without any issue on the page as soon as I select an option I get a page ...
user avatar
  • 2,092
0 votes
1 answer
17 views

Set different options in lightning-combobox in for:each template

I have a component that lets you select different troubleshooting scenarios that have specific outcomes related to them. The logic is as follows: User selects a scenario in a combobox. Different ...
user avatar
1 vote
2 answers
69 views

Disable some options of a lightning-combobox

Is it possible to disable specific options of a lightning-combobox like one can do with the attribute disabled of the option element in standard html (example below) <select> <option>1&...
user avatar
  • 15
0 votes
0 answers
61 views

How to prefix LWC Combobox items with several white spaces?

I've been using the LWC Combobox to implement a requirement that involves having indentation (prefixing with white spaces or just padding-left) on the Combobox items/options. The idea is to have a ...
user avatar
0 votes
1 answer
160 views

How to convert string with comma-separated values to lwc picklist

I am a beginner in LWC, hence please pardon for any mistakes, and would appreciate suggestions to improve. I am trying to create an LWC picklist (lightning-combobox) with options that are basically ...
user avatar
0 votes
2 answers
44 views

lwc combo box not binding values

I have a array like below in lwc js. I need display the value in combo box. Currently I am passing the variable which assign the prevoius array like below. But it's not displaying value???? in combo ...
user avatar
  • 23
0 votes
1 answer
58 views

Problem with LWC that should show a list of answers for each Question

I made an LWC that should show a list of question with some answers for each question under the Campaign Member, but after managing to retrieve the questions and show them in the HTML, I don't manage ...
user avatar
0 votes
1 answer
40 views

Access to option data in lightning combobox?

Given this code: HTML : <lightning-combobox name='Test' label='Testing' placeholder={serviceReopenTest} options={serviceOption} onchange={handleServiceChange} value={idServiceOption} ...
user avatar
  • 165
0 votes
1 answer
209 views

try to print a map in lwc combobox

i try to pass a string map from apex to js LWC and print that values in a combobox. i follow more answer from here, but dont working on my code. the combobox dont load data. apex metod @AuraEnabled ...
user avatar
  • 21
0 votes
1 answer
402 views

Opening Lightning Combobox options upwards

Since my dropdown is at the bottom of the page, if we try to select a value, it adds extra scrolling as select options open downwards. Can we open it upwards instead of downwards, either using ...
user avatar
0 votes
2 answers
125 views

How to increase length of dropdown for lightning-combobox in lightning web component?

I am trying to show all of the picklist value in dropdown instead of using scrollbar. Is there any way we can set the lenght/height of the dropdown for lightning-combobox component in lightning web ...
user avatar
0 votes
1 answer
601 views

CSS in LWC - lightning-combobox box to be curved (border-radius)

I want the lightning-combobox input box to be curved(border-radius: 18px). My research and attempts: I tried CSS for lightning-input as: .slds-modal input[type="text"]{ border-radius: ...
user avatar
  • 13
1 vote
1 answer
351 views

lightning-combobox validation - how to reset into no errors

I am building LWC component and have a few comboboxes that some of them are required. <lightning-combobox required="true" label="My combo" options={...
user avatar
  • 4,769
2 votes
0 answers
531 views

How to modify the height of a lightning-combobox dropdown?

I have a lwc combobox and I wanted to control the number of options shown. I tried a lot of CSS and slds existed on the internet but I couldn´t changed it. Could anyone help me? <div class="...
user avatar
0 votes
1 answer
4k views

TypeError: Cannot read properties of undefined (reading 'values')

I'm trying to setup a search filter for opportunity stage field through lightning combo box but however getting an error "cannot read properties of undefined while loading the component" <...
user avatar
0 votes
1 answer
84 views

Up , Down keyboard interaction not working in custom picklist aura component

<div class="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open" aura:id="resultsDiv" aria-expanded="true" aria-haspopup="listbox" ...
user avatar
0 votes
1 answer
50 views

Iterative Combobox cannot add "AND" Operator in LWC?

<lightning-button label="Edit" onclick={handleEdit}></lightning-button> <template for:each={productAccess} for:item="item" for:index="indexVar"> ...
user avatar
1 vote
1 answer
644 views

How to get lightning combobox list appear on top when there is few rows in lightning Datatable?

My question is similar to this, I have a custom dropdown column which is appearing completely fine when we have many rows in the datatable. But in a sitation when we have a single record, it Lightning:...
user avatar
0 votes
0 answers
32 views

How to se value of a combo-box in lightning web components?

Hi Having trouble setting a value of a lightning-combo-box on the page programmatically. tried this but it isn't finding it: this.template.querySelectorAll('lightning-combobox').forEach(ele => { ...
user avatar
1 vote
1 answer
394 views

Why isn't lightning-combobox actually setting the value to the selection?

I have a combobox in a modal dialog that looks like this: <template if:true={showAddTagDialog}> <section role="dialog" tabindex="-1" ...
user avatar
  • 663
1 vote
1 answer
362 views

Condition to render different templates in LWC

I have a problem with a condition, in a LWC. I have an array of addresses. If the array has only one element, I should display a radio button. If the array has more than 1 element, than I should ...
user avatar
0 votes
1 answer
111 views

How to make input element read only on button click

<lightning-input value={value} class="slds-p-horizontal--xx-small" variant="label-hidden"></lightning-input> <lightning-input type="number" name="...
user avatar
  • 29
1 vote
1 answer
132 views

Optimizing filter logic - Lightning-combobox options

What I have implemented: I have a lightning-datatable and the results can be filtered with three lightning-combobox components working together. The options for these comboboxes are fed from separate ...
user avatar
  • 1,490
0 votes
1 answer
88 views

Unable to populate "value" of a lightning-combobox

I have implemented a lightning-combobox using getPicklistValues, which works as expected as I can see all my picklist values. Here is my implementation: JS: @track modelValue= 'All'; @wire(...
user avatar
  • 1,490
0 votes
3 answers
460 views

Combobox options and Calendar are hiding behind the table in Lightning Web Component

We have created a custom table using Lightning web Component. In that table some of columns are of picklist(combo- box). when we click the that combo box Options are hiding behind the footer. How can ...
user avatar
0 votes
0 answers
306 views

Lightning Combobox Query SelectorAll

I have an LWC component with ten comboboxes in an html table. Upon clicking a button, I want to get the count of combo boxes for which a value is selected. For example: If only 6 combo boxes(out of ...
user avatar
  • 1
0 votes
1 answer
520 views

Why is the selected value not displayed in the "lightning-combobox"?

//html <lightning-combobox name="selectedYear" value={currentYear} placeholder="Select Year" options={...
user avatar
0 votes
2 answers
1k views

Lightning combobox not showing values

Below is my code I have combobox values in my activityOptions but my combobox does not displays anything. Please help me with this issue. .js // Complete activity for (let v of this.activity) { ...
user avatar
1 vote
1 answer
2k views

Getting an option as default value in a lightning-combobox component

I have a lightning-combobox component, that gets options from a javascript method. What I am trying to do is to get one of those options, as default value in the html component. Javascript method is ...
user avatar
1 vote
1 answer
36 views

combobox additional values?

I have a piece of JS here for my combobox. it works fine. @wire(getThemes,{ cabinetId: '$selectCab', brandId: '$selectBrand'}) wiredThemes({error, data }){ if (data) { this.themes = ...
user avatar
  • 464
0 votes
1 answer
367 views

Customizing hover text in lightning-combobox

We are using lightning-combobox (in lwc) to display a dynamic dropdown list. We are adding just the standard 2 attributes per option i.e label and value. When a user hovers on any of the options, ...
user avatar
  • 2,601
0 votes
0 answers
543 views

LWC table my custom object and combobox picklist filtred

I have a task to display a table of positions with the status field Combobox Picklist filtred. As I have not experience in JS and LWC, it is so difficult for me to understand how to do this. Help me ...
user avatar
0 votes
1 answer
525 views

Dynamically creating lightning combobox

I would like to preface this by stating that I only started Salesforce development about a month ago so forgive me if this an obvious questions. Here is my problem: I currently use an apex method to ...
user avatar
  • 25
0 votes
1 answer
365 views

Pass field data from Datatable to dynamic combobox extension to set combobox selections based on current record data

I have a datatable that shows data from a record query on a specific object, it allows edits and it also has comboboxes for the multitude of picklists. Each combobox has the correct options for the ...
user avatar
  • 464
0 votes
0 answers
317 views

Change Enter key press behavior on Lightning Combobox

I am trying to override behavior of enter key-press on a LWC form. The form has lightning-input elements and lightning-combobox elements. So on lightning-input elements, onkeypress i am checking if ...
user avatar
  • 1,295
1 vote
1 answer
760 views

Lazy loading lightning combobox lwc

I have a 'veryBigArrayWithData' that can have thousands of records. When clicking on a lightning-combobox to load label-value pairs from this array, the page becomes unresponsive due to the big ...
user avatar
  • 53
0 votes
1 answer
59 views

How can i put white-space in combo box in lightning

In this attached image the text of the list is too long and it is not fully coming how can i break that? {...
user avatar
0 votes
0 answers
172 views

lightning-input autosuggest

I have a LWC with a lightning-combobox whose options are populated via an apex query of records. The record list changes depending on the user accessing the LWC. There is one user for whom the query ...
user avatar
5 votes
1 answer
1k views

LWC Combobox with "add new" button

I need a lightning-combobox (or something similar) with available for choose values. But I also want to be able to type free text and choose "add new" value and save this typed text. I found ...
user avatar
0 votes
1 answer
266 views

Need to display object label in combobox

I need to display object label instead of API name in the combobox. How to access label of object dynamically? Below is the scrrenshot and code! .JS getCustomObjects({ }) .then(...
user avatar
1 vote
2 answers
965 views

SLDS modals: combobox loses focus on scroll

I have a modal with a lightning-combobox in it. When the combobox is in focus, the dropdown is displayed. When the user clicks elsewhere, the dropdown is hidden. So far so good, but if the height of ...
user avatar
0 votes
1 answer
508 views

How to set value in lightning:combobox in aura lightning?

<lightning:combobox aura:id="filterCaseType" label = "{!$Label.c.CPL_Event_Type}" name="caseTypes" placeholder="Case Type" options="{!v....
user avatar
1 vote
1 answer
4k views

Default a dynamic value in Combobox onload LWC

I am retrieving a set of values from apex through JS, I want to preselect the the first option in the Lightning-combobox (the retrieved values are different for different users). I used @track ...
user avatar
0 votes
1 answer
450 views

What is causing this strange behaviour in my lwc combobox?

I have a lightning-combobox with a onchange function that calls an apex method. From the onchange, when I select a new value I can see the method getting called and returning values. But once the ...
user avatar
2 votes
1 answer
293 views

How to close lightning-combobox menu items when scrolling the page in LWC?

I have a LWC and a lightning-combobox inside it, but while the dropdown items are open and I scroll the page, the menu items are still visible on top of other items. I need to auto-hide the menu items ...
user avatar
  • 33
0 votes
1 answer
888 views

Combobox drop-down list out of container

I am using a combobox inside a modal and I have a problem. You see, when I want to pick a value for the combobox, the dropdown list is shown under it, inside the modal container. And because the ...
user avatar
  • 51
1 vote
1 answer
680 views

lightning-combobox issue with Salesforce Mobile app in Screen Flow

I have created a LWC with just a lightning-combobox and then added it to a screen flow. Here is the LWC code: <template> <lightning-combobox label="Options" ...
user avatar
  • 258
0 votes
2 answers
451 views

Trigger onchange function after component is rendered

I have a problem with triggering a function on the lightning-combobox. Everything works fine in onchange action, but is there any way how to trigger that same function, when the components is loaded? ...
user avatar
  • 309
1 vote
1 answer
2k views

LWC : Unable to see values in combobox

I am doing LWC Superbadge challenge 4 and I am unable to show values in combobox. The page just displays blank. My code HTML - I printed searchoptions in a paragraph tag and it displayed on the page ...
user avatar
0 votes
1 answer
4k views

Get value of lightning-input and lightning-combobox from for loop in LWC

I am displaying data in LWC from an array in a for loop. The loop is using both lightning-input and lightning-combobox for inputs. <template for:each={tobeOppProduct} for:item="data"> ...
user avatar