1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-01-15 13:08:41 +00:00
bramw_baserow/web-frontend/modules/dashboard/realtime.js
2025-01-02 11:56:14 +00:00

9 lines
312 B
JavaScript

export const registerRealtimeEvents = (realtime) => {
realtime.registerEvent('widget_created', ({ store }, data) => {
if (
data.dashboard_id === store.getters['dashboardApplication/getDashboardId']
) {
store.dispatch('dashboardApplication/handleNewWidgetCreated', data.widget)
}
})
}