Picklist and options in LWC


<!-- Column B (Picklist) -->
<div class="slds-col">
    <lightning-combobox 
        label="Column B" 
        value={columnB} 
        placeholder="Select an option" 
        options={columnBOptions} 
        onchange={handlePicklistChange} 
        data-id="B">
    </lightning-combobox>
</div>
<!-- Column C (Picklist) -->
<div class="slds-col">
    <lightning-combobox 
        label="Column C" 
        value={columnC} 
        placeholder="Select an option" 
        options={columnCOptions} 
        onchange={handlePicklistChange} 
        data-id="C">
    </lightning-combobox>
</div>

columnBOptions = [
    { label: 'Option B1', value: 'B1' },
    { label: 'Option B2', value: 'B2' },
    { label: 'Option B3', value: 'B3' }
];

columnCOptions = [
    { label: 'Option C1', value: 'C1' },
    { label: 'Option C2', value: 'C2' },
    { label: 'Option C3', value: 'C3' }
];

Picklist and options in LWC Picklist and options in LWC Reviewed by dasfrogpractice on 02:12 Rating: 5

No comments:

Theme images by mariusFM77. Powered by Blogger.
Youtube Channel Image
Dasfrog Subscribe To watch more Salesforce Training
Subscribe