Generate parameterized Selector from output list in a pipeline

I have a pipeline that outputs a List that I want to use as either a Selector or MultiSelector depending on the exact stage of the pipeline. I put something that’s the general gist below. I tried reading in columns to a Selector directly, but this gives a TypeError. I have responsive parameterized selectors already set up in some of the other stages, which need the list values that are determined from the imported data frame in the first stage, so I can’t just bind a selector (which I think should probably work for this simple example). I’ve also tried determining the values in the second stage using param depends but I didn’t see the dropdowns populate with the expected values.

This is what I’m currently working with:

class StageA(param.Parameterized):
    filename = param.String()
    ready = param.Boolean(default = False)
    plate_data_load = param.DataFrame()
    button = param.Action(lambda x : x.param.trigger('button'), label = 'Load data')
    
    @param.depends('button', watch = True)
    def load_data(self):
        self.plate_data_load = pd.read_excel('data/'+self.filename+'.xlsx', sheet_name = 'Plate Summary')
        self.ready = True
        return self.plate_data_load
    
    @param.output(data=param.DataFrame, columns=param.List)
    def output(self):
        plate_df = self.plate_data_load
        plate_output = list(self.plate_data_load.columns)
        return plate_df, plate_output
    
    def panel(self):
        return pn.Column(pn.WidgetBox(self.param.filename, self.param.button))
    
class StageB(param.Parameterized):
    data = param.DataFrame()
    columns = param.List()
#    column_selector=param.Selector(objects=columns)
    
    @param.depends('columns')
    def selector(self):
        return param.Selector(objects=self.columns)
    
    def show_df(self):
        return pn.panel(self.data[self.columns], style={'overflow':'auto'},
                     sizing_mode='stretch_both', index=False)
    
    def panel(self):
        column_selector = param.Selector(objects = self.columns)
        show_df = pn.panel(self.data[self.columns], style={'overflow':'auto'},
                     sizing_mode='stretch_both', index=False)
        return pn.Column(self.selector())

pipeline1 = pn.pipeline.Pipeline(debug=True)
pipeline1.add_stage(name = 'Stage1', 
                   stage = StageA, ready_parameter = 'ready', auto_advance=True)
pipeline1.add_stage(name = 'Stage2',
                   stage = StageB)
pipeline1

Thoughts?

Messing about some more, I’ve found that if I start with an empty Selector and then populate its values from the pipeline list with init then I can get it display correctly, however, then I can’t seem to access the current value of the Selector to, for example, filter the data frame.