Hi all, I’m trying to maintain a consistent UI by using the standard Core Components <.table> generated by Phoenix (with DaisyUI styling), but I also want to integrate Flop sorting into the headers. At the same time, I’m using LiveView streams (phx-update=“stream”) to update only the table body.
Requirements:
1. Use Flop for sorting, so each header becomes clickable and triggers /admin/users?order_by=email&…
2. Keep the Core Components <.table>, without rewriting the whole table manually.
3. Keep using LiveView streams for the rows so updates are efficient and smooth.
I’ve tried:
• Using <Flop.Phoenix.sort_link> inside label={…}, but that doesn’t work because label expects a string.
• Adding slots like <:label>, but <.table> doesn’t support that.
• Using Flop.Phoenix.table, which supports sorting but does not support phx-update=“stream”, so it doesn’t play nicely with the Core Components setup.
⸻
Question:
Has anyone found a clean way to integrate Flop sorting into the Core Components <.table> while still leveraging LiveView streams for the table body—without having to rebuild the table manually?
If you’ve come across a pattern or a component wrapper that does exactly this, I’d love to see it!
Thanks in advance.