Hi Wappler Team & Community,
Context:
Wappler’s real-time sockets are fantastic for keeping native components (dmx-repeat, dmx-data-detail, etc.) in sync across tabs and users. However, there is currently no way to trigger custom JavaScript (or App Flow) logic when a <dmx-serverconnect>
component receives a data update via sockets (i.e., when a push/broadcast happens from the backend).
Current Limitation:
- The
updated
event (and App Flow events) on<dmx-serverconnect>
are only triggered on manual reloads or local actions, not when data is updated via sockets. - This means it is impossible to run custom JS (e.g., redraw a Leaflet map, update a chart, trigger a notification, etc.) in real-time when data changes, unless you use polling or hacks.
Why is this important?
- Many advanced UIs (maps, charts, custom visualizations) need to react to real-time data changes, not just native Wappler components.
- Without a JS event, there is no clean way to synchronize custom UI logic with real-time data updates.
What would be ideal?
- When a
<dmx-serverconnect>
receives new data via sockets, it should trigger theupdated
event (and/or a new event likesocket-updated
). - This would allow us to attach custom JS or Flows that run every time the data changes, regardless of the source (manual reload, socket push, etc.).
Example use cases:
- Redraw a Leaflet map when the underlying data changes in real-time.
- Update a custom chart or dashboard.
- Trigger a notification or animation on live data changes.
Related threads:
Thank you for considering this!
This would make Wappler’s real-time features even more powerful and open up many advanced use cases for the community.
Best,
Sylvain