thingsboard / thingsboard

Open-source IoT Platform - Device management, data collection, processing and visualization.
https://thingsboard.io
Apache License 2.0
17.54k stars 5.18k forks source link

Toast Notifications in Custom Action and Markdown HTML #10822

Open nicovon24 opened 5 months ago

nicovon24 commented 5 months ago

Hello, anyone knows how to show a toast notification using widget content, ctx or any variable in for example a Custom Action HTML? Thanks and have a good weekend!

devaskim commented 5 months ago

Details on toast API is here

    self.ctx.showToast('success', 'Toast message', 3000, 'top', 'center', 'dashboardRoot');

As a toast parent you can use either self.ctx.toastTargetId or dashboardRoot (last argument in the example)