From 9db44e2466a1e87d138cea9f16d1816c30063e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Tue, 8 Oct 2024 19:34:23 +0200 Subject: [PATCH] Update lib/kino/data_table.ex --- lib/kino/data_table.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/kino/data_table.ex b/lib/kino/data_table.ex index 89d49fa..a62afaf 100644 --- a/lib/kino/data_table.ex +++ b/lib/kino/data_table.ex @@ -179,7 +179,8 @@ defmodule Kino.DataTable do {data_rows, data_columns, count, name, sorting_enabled, inspected, formatter, num_rows} ) do features = Kino.Utils.truthy_keys(pagination: true, sorting: sorting_enabled) - info = %{name: name, features: features, num_rows: num_rows} + info = %{name: name, features: features} + info = if(num_rows, do: Map.put(info, :num_rows, num_rows), else: info) {count, slicing_fun, slicing_cache} = init_slicing(data_rows, count)