Selected column generated value is not clear after listener updates it collection values

hi all, sorry if the topic name is little messy

I got this table which column2 and column3 handle lookupFields

I added a listener to column2 to update the list of column3… -> and it does, no problem here

the thing is:
if I select an element of the list in column3, and then I change column2’s value, the list on column3 is refreshed but the selectedValue is not removed, cleared nor selected with the first element on the new list

I attached the project with a POF ( proof of failure :grin: )

generatedcolumns.zip (456.6 KB)

Hello!

LookupField does not change the value because it is bound with value form the entity. I’ve a little bit reworked your demo project:

  1. updateMonthSelection() method:

    private void updateMonthSelection(HasValue.ValueChangeEvent<String> valueChangeEvent, Month currentInstance) {
       // the same
    
       currentInstance.setSelectedMonth(null);
    }
    
  2. In generatedMonthColumn() method from:

    lookupField.setOptionsList(selectionMonthsDl.getMutableItems());
    

    to

    lookupField.setOptions(new ContainerOptions<>(selectionMonthsDl));
    

Reworked project: generatedcolumns.zip (89.4 KB)

it works perfectly!

thanks!!!