Is it possible to get the newly released notifications feature to work with a template? Clicking btn in the following code seems to work when I render the button in a notebook, but not when it’s rendered in the template…
import panel as pn
pn.extension(notifications=True)
def notify(event):
pn.state.notifications.info('this is a notification')
btn = pn.widgets.Button(name='Notify')
btn.on_click(notify)
template = pn.template.FastGridTemplate(sidebar=[btn])
template.show()
At least when served with panel serve from the commandline this works fine. I think when you run .show it gets confused about the pn.state.notification instance it’s meant to use however and it doesn’t work. Definitely worth filing an issue about this on the Panel issue tracker.