• Aanchal
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I have the following component:
<aura:component >
	<aura:attribute name="options" type="List" default="[
        {label: 'Opt 1', value: 'opt1'},
        {label: 'Opt 2', value: 'opt2'},
        {label: 'Opt 3', value: 'opt3'}
    ]"/>
    <aura:attribute name="value" type="String[]"/>
    
    <lightning:checkboxGroup
        title="Group"
        aura:id="mygroup"
        name="checkboxGroup"
        label="Checkbox Group"
        options="{! v.options }"
        value="{! v.value }" />
    
    <lightning:formattedText value="{!'Checkbox group value: ' + v.value}"></lightning:formattedText>
    <br/>    
    <lightning:button label="Select Opt 1 and Opt 3" onclick="{!c.selectOpt1AndOpt3}"/>
</aura:component>

with the following controller:
({
    selectOpt1AndOpt3: function(component, event, helper) {
        component.set("v.value", ['opt1', 'opt3']);
    }
})

When the button is clicked, v.value is updated and the new value is reflected in lightning:formattedNumber, but lightning:checkboxGroup does not update with the new value or sometimes updates incorrectly (apparently random options are selected). This used to work in Spring 18, but since Summer 18 it doesn't work for me, so I assume this is a bug.