I’m using the excellent Flop and Flop.Phoenix libraries to handle sorting/filtering/etc, but I’ve run into an annoying warning I haven’t been able to solve.
I want to wrap the provided Flop.Phoenix.table/1 component together with some pagination and styling so that I can re-use it in multiple places throughout my app. I’ve come up with the following, which works well:
def flop_table(assigns) do
~H"""
<div class="flex flex-col items-center gap-4">
<Flop.Phoenix.table
opts={[table_attrs: [class: "table table-zebra w-full"]]}
{assigns}
>
</Flop.Phoenix.table>
<.pagination meta={@meta} path={@path} />
</div>
"""
end
The only problem is that I get this warning:
warning: missing required slot "col" for component Flop.Phoenix.table/1
That makes sense – I’m not explicitly setting the col slot there, but I don’t know a way around this. Is there an idiomatic way to tackle this?






















