DynamicMap not updating the title of the layout

DynamicMap of Layout with title doesn’t update. Is that expected or should I open a bug report?

E.g. the code below with dynamic map works fine updating the title to ‘a’ or ‘b’ as expected.

import pandas as pd
import hvplot.pandas
import holoviews as hv
from holoviews import opts, dim
import panel as pn

df = pd.DataFrame({'a': range(n), 'b': range(n, 2*n)})

def show_plot(col):
    return df[col].hvplot().opts(title=col)

dmap = hv.DynamicMap(show_plot, kdims=['col'])


but not this one (title doesn’t change when selecting ‘a’ or ‘b’) !?

def show_plot_in_layout(col):
    return hv.Layout([df[col].hvplot().opts(title='')]).opts(title=col)

dmap_layout = hv.DynamicMap(show_plot_in_layout, kdims=['col'])


Attached the notebook if you want to run it.

holoviews_dynamicmap_title_layout_update_bug.ipynb (7.2 MB)