Friday, October 2, 2020

LWC checkbox-group Example:

 Scenario: 

Create a checkbox-group in LWC which will display list of Object with CHECK-BOX selection in your ORG.

Solution:
Check combobox example in my previous post (LWC combobox Example:) and create LWC component and it's controller class same as describe on that post. Once done just modify the full .html file with below line of codes,
<template>
    <lightning-card title="checkbox-group Example"> 
        <p>Object selection are:: {selectedObjValue}</p>
        <br/>
        <lightning-checkbox-group name="objects"
            label="Please Select The Object(s)."
            options={objectOptions}
            value={selectedObjValue}
            onchange={handleObjectChange}>
        </lightning-checkbox-group>    
    </lightning-card>
</template>


OUTPUT:


After selection of Checkbox




LWC to LWC Communication using Lightning Messaging Service (Part - 2)

In my previous post ( previous post link ) we have learn how to create a Lightning Messaging Service with 6 steps and today we will use the ...