CheckButtonGroup does not hold the value

Hello,
I am trying to create my first app and I have code below. However the CheckButtonGroup does not hold values. If I click on ‘Strawberry’ in first CheckButtonGroup and ‘Pear’ in second CheckButtonGroup, the ‘Strawberry’ in first one is un-clicked again. However the value of view.coarse1 is still correct. Can you please help me, am I missing something?

import panel as pn
import param
import holoviews as hv
pn.extension()
class WoeViewer(param.Parameterized):
    options=['Apple', 'Banana', 'Pear', 'Strawberry']
    coarse1 = param.ListSelector( objects=options)
    coarse2 = param.ListSelector( objects=options)
    @param.depends('coarse1','coarse2', watch=True)
    def _update_coarse(self):
        self.param['coarse2'].objects = [option for option in self.options if option not in self.coarse1] 
        self.param['coarse1'].objects = [option for option in self.options if option not in self.coarse2]
        
view = WoeViewer(name='WOE Viewer')

full=pn.Param(view.param, widgets={
    'coarse1': pn.widgets.CheckButtonGroup,
    'coarse2': pn.widgets.CheckButtonGroup
})
full

Hi, this may be a bug. It seems that the browser keep in memory the position of the active button. So when you click on pear, the Strawberry button moves from the 4th position to the 3rd but for the browser only the 4th button is active so the Strawberry button is displayed un-clicked.

A workaround could be to reload the parameters like that :

import panel as pn
import param
import holoviews as hv
pn.extension()
class WoeViewer(param.Parameterized):
    options=['Apple', 'Banana', 'Pear', 'Strawberry']
    coarse1 = param.ListSelector( objects=options)
    coarse2 = param.ListSelector( objects=options)
    update = param.Action(lambda x : x.param.trigger('update'))

    @param.depends('coarse1','coarse2', watch=True)
    def _update_coarse(self):
        self.param['coarse2'].objects = [option for option in self.options if option not in self.coarse1] 
        self.param['coarse1'].objects = [option for option in self.options if option not in self.coarse2]
        self.param.trigger('update')
    
    @param.depends('update')
    def view(self):
        return pn.Param(self.param,parameters=['coarse1','coarse2'],
                                   widgets={'coarse1' : pn.widgets.CheckButtonGroup, 
                                            'coarse2' : pn.widgets.CheckButtonGroup})

viewer = WoeViewer(name='WOE Viewer')

full = pn.Row(viewer.view) 

full